[tz] Posix time zone question

Nathan Stratton Treadway nathanst at ontko.com
Wed Jan 11 22:24:52 UTC 2012


On Wed, Jan 11, 2012 at 20:58:38 +0000, Donald MacQueen wrote:
> 
> 1) What is the difference between America/Detroit and posix/America/Detroit? The
> test cases I have written return what looks like the same DST record for a given
> date no matter which one I use. Under what circumstances would I use
> posix/America/Detroit?

The actual distinction is betweeh "posix" and "right", which differ in
whether they account for the existence of leap seconds when counting
seconds-since-the-epoch.  On a particular system, the default one of
those two choices is found in the timezones without a prefix; that
default will presumably always match either "posix" or "right".

So, for example, on my Debian system there are three "America/Detroit"
files.  If I run md5sum on each of the three, I see that the no-prefix
one matches the "posix' one:

  $ md5sum `locate Detroit`
  17b0eead3047f767a1d8eefa5151308e  /usr/share/zoneinfo/America/Detroit
  17b0eead3047f767a1d8eefa5151308e  /usr/share/zoneinfo/posix/America/Detroit
  4c99fc9061e7353cf5310f582a16e428  /usr/share/zoneinfo/right/America/Detroit

Assuming your system is the same, it would obviously make sense that
your test cases would all return the same result for the two zones you
were trying -- but if you compare America/Detroit and
right/America/Detroit, you should find some differences...

 
> 2) Where is the format of the tz source filesdescribed? Specifically what do
> SAVE and Letter/S mean below? I am also interested in what the Link format is.
> 
> # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
> Rule	Nic	1979	1980	-	Mar	Sun>=16	0:00	1:00	D
> Rule	Nic	1979	1980	-	Jun	Mon>=23	0:00	0	S

The zic man page (zic.8) documents these fields.

						Nathan

----------------------------------------------------------------------------
Nathan Stratton Treadway  -  nathanst at ontko.com  -  Mid-Atlantic region
Ray Ontko & Co.  -  Software consulting services  -   http://www.ontko.com/
 GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt   ID: 1023D/ECFB6239
 Key fingerprint = 6AD8 485E 20B9 5C71 231C  0C32 15F3 ADCD ECFB 6239



More information about the tz mailing list