Oracle SQL Developer 21.4: Configuring TIMESTAMP WITH LOCAL TIME ZONE Display Across Time Zones
0 reputation · 24 Jun 2021, 18:43 UTC
0 reputation · 24 Jun 2021, 18:43 UTC
Determine the optimal strategy for rendering TIMESTAMP WITH LOCAL TIME ZONE values in SQL Developer when users operate in different regional settings.
NLS_DATE_FORMAT and JDBC defaults.TIMESTAMP WITH LOCAL TIME ZONE is normalized to the database time zone and returned adjusted to the session time zone.Should the client render TIMESTAMP WITH LOCAL TIME ZONE values in the operating‑system local time or strictly follow the database session time zone? The current behavior follows the session time zone, which may misalign with user expectations in multi‑region deployments.
TIMESTAMP WITH LOCAL TIME ZONE columns?In SQL Developer 21.4 open Tools → Preferences → Database → NLS and set the Time Zone option to Client OS. This initializes the session SESSIONTIMEZONE to the operating‑system zone for the current connection, causing TIMESTAMP WITH LOCAL TIME ZONE values to be returned already adjusted to that zone.
The thin driver accepts the URL property oracle.jdbc.defaultNlsTimezone. When specified (e.g., ?oracle.jdbc.defaultNlsTimezone=UTC or SYSTEM), the driver sets SESSIONTIMEZONE to that value before any SQL is executed, thereby influencing how TIMESTAMP WITH LOCAL TIME ZONE columns are rendered.
Thick OCI connections inherit the client OS time zone via the Oracle client environment. Thin JDBC connections default to the database time zone unless oracle.jdbc.defaultNlsTimezone is supplied. Consequently, the same stored TIMESTAMP WITH LOCAL TIME ZONE value can appear with different offsets when queried through OCI versus thin.
To tailor the recommendation, please confirm whether your SQL Developer connections use the thin JDBC driver or a thick OCI driver.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.