The TZ_OFFSET function returns the time zone offset of a specified time zone.
Note
The time zone offset refers to the difference between the current time zone and Greenwich Mean Time (GMT).
Syntax
TZ_OFFSET (n)Parameters
Parameter | Description |
n | The name of the time zone whose offset you want to retrieve. You can execute the following statement to retrieve the name of the time zone from the |
Examples
Execute the following statement to query the time zone offset of the
Antarctica/Syowatime zone:SELECT TZ_OFFSET('Antarctica/Syowa');In the following query result,
Antarctica/Syowais 3 hours ahead of GMT:tz_offset ----------- +03:00 (1 row)Execute the following statement to query the time zone offset of the
US/Easterntime zone:SELECT TZ_OFFSET('US/Eastern');In the following query result,
US/Easternis 5 hours behind GMT:---The following query result shows the time zone offset of the US/Eastern time zone in winter time. tz_offset ----------- -05:00 (1 row)