Quick Search:
 
 The Oracle TZ_OFFSET Function      [Return To Index] Jump to:  

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 |    Search |    Code Library |    Sponsors |    Privacy |    Terms of Use |    Contact Us © 2003 - 2024 psoug.org