When I check the session timezone in SQL developer with
select sessiontimezone from dual;
I get 'Europe/Berlin'. When I do the same in SQL*Plus I get '+02:00'.
This makes a difference when dealing with TIMESTAMP WITH LOCAL TIMEZONE, as Germany is sometimes in timezone UTC+01 and sometimes in UTC+02 due to daylight saving time. (Currently it's in UTC+02.)
How do the two tools get / set (?) their default timezones?
System information:
The documentation list only the environment variable ORA_SDTZ.
However, it is taken from following settings:
Registry Key HKCU\SOFTWARE\ORACLE\KEY_{Oracle Home Name}\ORA_SDTZ
Registry Key HKLM\SOFTWARE\ORACLE\KEY_{Oracle Home Name}\ORA_SDTZ
(resp. HKLM\SOFTWARE\Wow6432Node\ORACLE\KEY_{Oracle Home Name}\ORA_SDTZ)
Environment variable ORA_SDTZ
Current locale settings of your machine (most likely).
Database time zone if none from above is found (just an assumption)
Your client application may have some additional sources for session time zone, see How to change the timezone of Oracle SQL Developer / Oracle Data Modeler? as example.
Environment variable should have the highest precedence.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With