Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Timezone Problem
Björn Wächter wrote:
> Hello,
>
> I'm a bit confused about the result of tz_offset in oracle.
>
> I don't understand the result of this query
>
> SELECT tz.*, tz_offset(tz.tzname) DIFF
> FROM V$TIMEZONE_NAMES tz WHERE TZNAME IN
> ('US/Eastern','GMT','Europe/Berlin','Atlantic/Azores','Etc/GMT+1'))
>
>
> I think the result of tz_offset is the offset tu UTC
>
> TZNAME | TZABBREV | DIFF
> Atlantic/Azores | LMT | -01:00
> Atlantic/Azores | HMT | -01:00
> Atlantic/Azores | AZOT | -01:00
> Atlantic/Azores | AZOST | -01:00
> Atlantic/Azores | AZOMT | -01:00
> Atlantic/Azores | WET | -01:00
> Etc/GMT+1 | GMT+1 | -01:00
> Europe/Berlin | LMT | +01:00
> Europe/Berlin | CET | +01:00
> Europe/Berlin | CEST | +01:00
> Europe/Berlin | CEMT | +01:00
> GMT | GMT | +00:00
> US/Eastern | LMT | -05:00
> US/Eastern | EST | -05:00
> US/Eastern | EWT | -05:00
> US/Eastern | EDT | -05:00
>
> - GMT is UTC so the offset is 0
> - US/Eastern is in the west of London (UTC) so the result is negative
> - Berlin is in the East of London(UTC) so the result is positive
> - GMT+1 has a result of -01:00 but this indicates it is 1 hour in the
> west of London like Atlantic/Azores. But GMT+1 is the Timezone of
> Berlin. The Timezone of the Azores is GMT-1.
> See:
> http://www.timeanddate.com/worldclock/city.html?n=271
>
> So why Is the offset of the Azores and GMT+1 the same?
We ran into this just the other day. Although I can't back this with evidence here's our theory: we guess there is an old naming convention that used GMT+n to denote a time zone that is n hours after GMT. At least it's consistend, i.e. GMT+5 is -0500 and GMT-7 is +0700 etc. We coped with this by displaying the name *and* offset in the UI of our app.
Kind regards
robert Received on Tue Dec 20 2005 - 09:12:56 CST