What I want (pseudo-code): “Select XXX as timezone_region_name” to return “America/New_York” or “UTC”. It may be that the timezone was not set for the database at install time, and if it were, these queuries would work. -- FAILED SELECT DBTIMEZONE FROM dual; --FAILED select systimestamp, to_char(systimestamp, 'TZR'), extract (timezone_region from systimestamp) from dual; --FAILED SELECT systimestamp AT TIME ZONE DBTIMEZONE "DB Time" FROM DUAL; --FAILED select to_char(systimestamp, 'TZR') from dual;
Guess2 wrote:Oracle DB has NO capability for determining or maintaining date, time, or timezone details; independent of the OS.
I dont want to modify my session. I want to know the timezone that the OS clock is set at. When you select sysdate from dual, oracle uses the OS time. I need the active 'region', not the -05:00 offset.
I do not want to have to rely on my OS's timezone to be set correctly. This code will run off of application servers on sesparate servers. This is managed by a completely different company who I have no contact with. So I need to be able to tell by looking in the database what timezone the DB is in.
Well, we have to have some controls in place to prevent "the misguided" from doing stupid things. :-)
someone set an autoreboot script to start oracle under csh with no TZ setting - which defaults to central time.