9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: quanstro@labs.coraid.com (erik quanstrom)
Subject: [9fans] time zones
Date: Thu, 31 Mar 2011 15:55:09 -0400	[thread overview]
Message-ID: <1c521cd511f78003599e3766706af445@coraid.com> (raw)
In-Reply-To: <474c3d0c085468d4da7ddd19766b7242@gandalf.orthanc.ca>

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



  reply	other threads:[~2011-03-31 19:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-27 22:35 Lyndon Nerenberg (VE6BBM/VE7TFX)
2011-03-28  2:04 ` erik quanstrom
2011-03-28  4:25   ` Lyndon Nerenberg
2011-03-31 19:32   ` Lyndon Nerenberg (VE6BBM/VE7TFX)
2011-03-31 19:55     ` erik quanstrom [this message]
2011-03-31 20:26       ` Lyndon Nerenberg (VE6BBM/VE7TFX)
2011-03-31 23:08         ` erik quanstrom
2011-03-31 23:24           ` Lyndon Nerenberg (VE6BBM/VE7TFX)
2011-04-01  7:21             ` Richard Miller
2011-03-31 20:26       ` Lyndon Nerenberg (VE6BBM/VE7TFX)
  -- strict thread matches above, loose matches on Subject: below --
2011-03-27 22:33 Lyndon Nerenberg (VE6BBM/VE7TFX)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1c521cd511f78003599e3766706af445@coraid.com \
    --to=quanstro@labs.coraid.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).