Standard for timezone handling with TZ

Arthur David Olson ado
Mon Feb 14 14:40:09 UTC 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.

My guess is it's best to keep some sort of GMT rules; as the etcetera file
notes,
    # All of these are set up just so people can "zic -l" to a timezone
    # that's right for their area, even if it doesn't have a name or dst rules
    # (half hour zones are too much to bother with -- when someone asks!)
and if you don't have the rules you can't do the "zic -l".
(Whether there should be some mechanism to establish a rule-based rather than
file-based time zone as local time is another question.)

> *** 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

Is it better to render these as, for example,

>   Zone	GMT		0	-	GMT
>   
> ! Zone	GMT+1200	-12	-	GMT+1200
> ! Zone	GMT+1100	-11	-	GMT+1100

Or, given Casper H. S. Dik's example...
	> 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
...does POSIX *require* that the above rules be written

>   Zone	GMT		0	-	GMT
>   
> ! Zone	GMT+1200	-12	-	GMT
> ! Zone	GMT+1100	-11	-	GMT

(that is, without the "+1200" modifier to the zone name that will appear in
user-visible output)?

				--ado



More information about the tz mailing list