TIMESTAMPTZ (timestamp with time zone)
The zone-aware timestamp is the only datetime type that names a real instant. The engines disagree on whether to keep the offset you gave them or throw it away.
- Family
- Dates & times
- Missing in
- None of the five
- Gotchas
- 5 listed
Engine by engine
A timestamp plus a UTC offset. PostgreSQL normalizes to UTC and stores 8 bytes; SQL Server DATETIMEOFFSET and Oracle's WITH TIME ZONE keep the original offset; MySQL has no true equivalent.
| Engine | Type | Storage | Notes |
|---|---|---|---|
| SQL Server |
DATETIMEOFFSET
|
8 to 10 bytes | DATETIMEOFFSET(p) keeps a DATETIME2 plus an offset from -14:00 to +14:00; 8 bytes at p 0-2, 10 at p 5-7. |
| PostgreSQL |
TIMESTAMPTZ
|
8 bytes | Stores UTC internally; the zone you type is converted on the way in and reapplied from the session TimeZone on the way out. The original offset is not kept. |
| MySQL |
TIMESTAMP
|
4 bytes | Closest match but stores no offset: values are converted from the session time zone to UTC (4 bytes, range 1970-2038) and back on retrieval. |
| SQLite |
TEXT
|
variable | No native type. Store ISO-8601 text with an offset, such as '2026-02-14T09:30:00+02:00', and convert with datetime() or the unixepoch modifiers. |
| Oracle |
TIMESTAMP WITH TIME ZONE
|
13 bytes | Keeps the original zone as a region name (like 'America/New_York') or a fixed offset; a region shows the right DST offset for each instant. |
Gotchas
Where the engines disagree. These tend to surface as bugs during a migration or a port.
- PostgreSQL's timestamptz does not store a time zone, despite the name. It stores a UTC instant; the offset you entered is discarded and output re-rendered in the session's TimeZone setting.
- SQL Server's DATETIMEOFFSET keeps the offset alongside the time, so comparisons convert to UTC first - two rows with different offsets compare by the instant they name, not the digits on disk.
- Oracle's 13-byte WITH TIME ZONE can store a region name instead of a numeric offset, so the same column shows -05:00 for January rows and -04:00 for July rows; a stored -05:00 is -05:00 forever.
- MySQL has no offset-preserving type at all. TIMESTAMP silently normalizes to UTC through the session time zone, which moves with each connection's settings.
- SQLite leaves every decision to you: text with offsets compares incorrectly as strings when offsets differ, so normalize to UTC text or use the unixepoch for ordering.
Common questions
Does PostgreSQL TIMESTAMPTZ store the time zone?
No. It converts your input to UTC, stores 8 bytes, and formats output in the session's time zone. To keep the original offset, add a separate zone or offset column.
What is the SQL Server equivalent of TIMESTAMPTZ?
DATETIMEOFFSET. It stores a DATETIME2 plus the offset, so unlike timestamptz it preserves what was entered. CAST(dt2 AS datetimeoffset) just attaches +00:00; use AT TIME ZONE or TODATETIMEOFFSET to attach a real zone.
How many bytes does a time-zone-aware timestamp use?
8 bytes in PostgreSQL, 8 to 10 for SQL Server DATETIMEOFFSET, 13 in Oracle, and 4 for MySQL's UTC-normalized TIMESTAMP.
Map a type to the other four engines
The free type converter maps a type from one engine to its closest equivalent in the others and says where storage, precision or behaviour differ. The desktop app does the same mapping while you edit.