Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 The Oracle TZ_OFFSET Function      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

Term: TZ_OFFSET

Definition:
The Oracle TZ_OFFSET function returns the time zone offset that corresponds to the value you specify. You can enter a time zone name, a time zone offset from UTC, or the keyword SESSIONTIMEZONE or DBTIMEZONE.

To find all valid time zone values, you can run the following query:

SELECT DISTINCT tzname
from V$TIMEZONE_NAMES;

or
SELECT DBTIMEZONE FROM dual;


tz_offset('US/Michigan') - would return '-05:00'

tz_offset('-08:00') - would return '-08:00'

tz_offset(SESSIONTIMEZONE) - would return '-07:00' (this is dependent on your configuration)

Note that the TZ_OFFSET from DBTIMEZONE may not be reliable if the "SET TIME_ZONE" clause was not used when the database was created.



Related Links:

Related Code Snippets:
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 79 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?