Oracle TIMESTAMP WITH TIME ZONE: Storage, Precision, and Examples
Oracle TIMESTAMP WITH TIME ZONE stores a timestamp together with explicit time-zone information.
Unlike TIMESTAMP WITH LOCAL TIME ZONE, Oracle does not normalize this datatype to the database time zone for storage. The value retains time-zone information as part of the value.
Syntax
TIMESTAMP [(fractional_seconds_precision)] WITH TIME ZONE
fractional_seconds_precision can range from 0 to 9.
The default is 6.
Oracle stores this datatype in a fixed 13-byte representation.
Create a Column
CREATE TABLE events (
id NUMBER PRIMARY KEY,
happened_at TIMESTAMP(6) WITH TIME ZONE
);
Insert a Value with an Offset
INSERT INTO events
VALUES (
1,
TO_TIMESTAMP_TZ(
'2026-10-07 09:30:00 -07:00',
'YYYY-MM-DD HH24:MI:SS TZH:TZM'
)
);
The value includes both the local date/time and its time-zone displacement.
Use a Time-Zone Region
A region name can preserve the time-zone rules associated with a geographic region:
INSERT INTO events
VALUES (
2,
TO_TIMESTAMP_TZ(
'2026-07-01 09:30:00 America/Los_Angeles',
'YYYY-MM-DD HH24:MI:SS TZR'
)
);
Region names are useful when daylight-saving rules matter.
Convert to Another Time Zone
Use AT TIME ZONE:
SELECT
happened_at,
happened_at AT TIME ZONE 'UTC' AS utc_time
FROM events;
This converts the displayed timestamp to UTC while representing the same instant.
Do You Need to Store Everything in UTC?
No.
A TIMESTAMP WITH TIME ZONE column is specifically designed to preserve explicit time-zone information. You may store values with different offsets or regions.
For systems that prefer a normalized UTC representation, converting to UTC can still be a valid application design choice, but it is not a requirement of this datatype.
Equality and UTC Instants
Oracle compares TIMESTAMP WITH TIME ZONE values by the instant they represent.
For example, these two timestamps represent the same moment:
2026-10-07 08:00:00 -08:00
2026-10-07 11:00:00 -05:00
Both correspond to 16:00:00 UTC, so Oracle considers them equal as timestamp-with-time-zone values.
TIMESTAMP WITH TIME ZONE vs TIMESTAMP
TIMESTAMP stores date, time, and optional fractional seconds but no time zone.
TIMESTAMP WITH TIME ZONE adds explicit time-zone information.
Use the latter when the source zone or offset is part of the meaning of the data.
TIMESTAMP WITH TIME ZONE vs LOCAL TIME ZONE
TIMESTAMP WITH LOCAL TIME ZONE is normalized to the database time zone when stored and displayed in the session time zone when retrieved.
TIMESTAMP WITH TIME ZONE retains explicit time-zone information as part of the value.
Summary
TIMESTAMP WITH TIME ZONEstores date/time plus explicit time-zone information.- Fractional-second precision ranges from 0 to 9; the default is 6.
- Oracle uses a fixed 13-byte representation.
- Values do not have to be stored in UTC.
AT TIME ZONEconverts a value to another time zone.- Values representing the same UTC instant compare as equal.
See Oracle’s Data Types documentation.