Standard for timezone handling with TZ
Paul Eggert
eggert at twinsun.com
Thu Feb 10 19:56:31 UTC 1994
In comp.unix.solaris Casper H.S. Dik writes:
> SunOS 4:
> % env TZ=GMT-4 date GMT-4 is a timezone file (Olson)
> Thu Feb 10 04:29:42 GMT-0400 1994
> % env TZ=GMT-04 date But use POSIX rules here
> Thu Feb 10 12:32:21 GMT 1994
That's a bug in the Olson rules; they aren't compatible with Posix
1003.1-1990. Thanks for pointing it out. Here's a conservative patch
to Olson's latest version which renames `GMT-4' to `GMT-0400' to avoid
the bug.
Another possibility is simply to remove the GMT[-+]* rules, since their
sign is the opposite of the sign in the Posix TZ string, and this is confusing.
*** etcetera 1992/04/23 17:34:35 7.1
--- etcetera 1994/02/10 19:49:45 7.1.1.1
***************
*** 6,55 ****
Zone GMT 0 - GMT
! Zone GMT-12 -12 - GMT-1200
! Zone GMT-11 -11 - GMT-1100
! Zone GMT-10 -10 - GMT-1000
! Zone GMT-9 -9 - GMT-0900
! Zone GMT-8 -8 - GMT-0800
! Zone GMT-7 -7 - GMT-0700
! Zone GMT-6 -6 - GMT-0600
! Zone GMT-5 -5 - GMT-0500
! Zone GMT-4 -4 - GMT-0400
! Zone GMT-3 -3 - GMT-0300
! Zone GMT-2 -2 - GMT-0200
! Zone GMT-1 -1 - GMT-0100
! Zone GMT+1 1 - GMT+0100
! Zone GMT+2 2 - GMT+0200
! Zone GMT+3 3 - GMT+0300
! Zone GMT+4 4 - GMT+0400
! Zone GMT+5 5 - GMT+0500
! Zone GMT+6 6 - GMT+0600
! Zone GMT+7 7 - GMT+0700
! Zone GMT+8 8 - GMT+0800
! Zone GMT+9 9 - GMT+0900
! Zone GMT+10 10 - GMT+1000
! Zone GMT+11 11 - GMT+1100
! Zone GMT+12 12 - GMT+1200
! Zone GMT+13 13 - GMT+1300 # GMT+12 with DST
Link GMT UTC
Link GMT UCT
Link GMT Universal
Link GMT Greenwich
Link GMT Zulu
! Link GMT GMT-0
! Link GMT GMT+0
! Link GMT GMT0
! Link GMT+1 GMT1
! Link GMT+2 GMT2
! Link GMT+3 GMT3
! Link GMT+4 GMT4
! Link GMT+5 GMT5
! Link GMT+6 GMT6
! Link GMT+7 GMT7
! Link GMT+8 GMT8
! Link GMT+9 GMT9
! Link GMT+10 GMT10
! Link GMT+11 GMT11
! Link GMT+12 GMT12
! Link GMT+13 GMT13
--- 6,41 ----
Zone GMT 0 - GMT
! Zone GMT-1200 -12 - GMT-1200
! Zone GMT-1100 -11 - GMT-1100
! Zone GMT-1000 -10 - GMT-1000
! Zone GMT-0900 -9 - GMT-0900
! Zone GMT-0800 -8 - GMT-0800
! Zone GMT-0700 -7 - GMT-0700
! Zone GMT-0600 -6 - GMT-0600
! Zone GMT-0500 -5 - GMT-0500
! Zone GMT-0400 -4 - GMT-0400
! Zone GMT-0300 -3 - GMT-0300
! Zone GMT-0200 -2 - GMT-0200
! Zone GMT-0100 -1 - GMT-0100
! Zone GMT+0100 1 - GMT+0100
! Zone GMT+0200 2 - GMT+0200
! Zone GMT+0300 3 - GMT+0300
! Zone GMT+0400 4 - GMT+0400
! Zone GMT+0500 5 - GMT+0500
! Zone GMT+0600 6 - GMT+0600
! Zone GMT+0700 7 - GMT+0700
! Zone GMT+0800 8 - GMT+0800
! Zone GMT+0900 9 - GMT+0900
! Zone GMT+1000 10 - GMT+1000
! Zone GMT+1100 11 - GMT+1100
! Zone GMT+1200 12 - GMT+1200
! Zone GMT+1300 13 - GMT+1300 # GMT+12 with DST
Link GMT UTC
Link GMT UCT
Link GMT Universal
Link GMT Greenwich
Link GMT Zulu
! Link GMT GMT-0000
! Link GMT GMT+0000
More information about the tz
mailing list