Which rules does Oracle apply when converting a TIMESTAMP WITH TIME ZONE value after the session NLS_TIME_ZONE changes?
0 reputation · 11 Nov 2022, 10:07 UTC
Determine how Oracle Database handles a TIMESTAMP WITH TIME ZONE value when the session’s NLS_TIME_ZONE parameter is changed between the time the value is inserted and the time it is queried. The value is stored with its original time‑zone offset, but retrieval may apply the current session time zone, potentially altering the displayed instant, especially when daylight‑saving‑time rules are involved.
Because the documentation does not explicitly state whether the original instant is preserved or the value is re‑zoned to the new session setting, and because internal DST‑transition handling may vary across releases, the exact outcome remains uncertain for mixed‑workload applications that rely on consistent timestamps.
- Does Oracle return the original instant unchanged, or does it adjust the timestamp to the current NLS_TIME_ZONE?
- When the instant falls exactly on a DST transition, which offset (earlier or later) does Oracle apply after a time‑zone change?
- Is the behavior consistent across Oracle 11g, 12c, 19c, and 21c, or have there been undocumented changes?