From mboxrd@z Thu Jan 1 00:00:00 1970 From: quanstro@labs.coraid.com (erik quanstrom) Date: Thu, 31 Mar 2011 15:55:09 -0400 Subject: [9fans] time zones In-Reply-To: <474c3d0c085468d4da7ddd19766b7242@gandalf.orthanc.ca> References: <474c3d0c085468d4da7ddd19766b7242@gandalf.orthanc.ca> Message-ID: <1c521cd511f78003599e3766706af445@coraid.com> Topicbox-Message-UUID: c5239516-ead6-11e9-9d60-3106f5b1d025 On Thu Mar 31 15:34:21 EDT 2011, lyndon at orthanc.ca wrote: > > the reason for the confusion, is that the localtime > > applies the offset before applying the dstpairs. > > (/sys/src/libc/port/ctime.c) i belive i tripped on this > > when i did the work for the us zones. > > Why this somewhat obscure format? Raw epoch (GMT) time() values seem > to be the obvious choice here. i think the answer to this is obvious. if it weren't done this way, then the dstpairs would be unique to the timezone. each timezone would require a unique list of dstpairs. the way it is, the same dstpair list may be used for every timezone with the same dst law. the same set of dstpairs can be used for every us location. (ok, for places that don't do dst, the pairs are unnecessary.) only the first line of the zone needs changes. further, the time of the change is easy to see in GMT. that's a big advantage when double-checking your work. why don't you just pull the new zones from sources? it's all fixed, and integrated. - erik