git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Russ Allbery <rra@stanford.edu>
To: git@vger.kernel.org
Subject: Re: Date handling.
Date: Sat, 23 Apr 2005 23:43:37 -0700	[thread overview]
Message-ID: <87r7h0u12e.fsf@windlord.stanford.edu> (raw)
In-Reply-To: <1114324729.3419.78.camel@localhost.localdomain> (David Woodhouse's message of "Sun, 24 Apr 2005 16:38:49 +1000")

David Woodhouse <dwmw2@infradead.org> writes:

> I don't think we want to be in the business of counting leap seconds; we
> need to let the system do it. I don't much like setting TZ to UTC though
> -- how about we use your test case to find the offset and subtract that?

> Does this work?

Nope, daylight savings time breaks this, since you may or may not be in
the same time zone on January 1st as you are at the current time.

However, you don't need to count leap seconds when you implement your own
mktime, since mktime doesn't have to take leap seconds into account.  Unix
timestamps, unless you're using TAI, don't include leap seconds.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

  reply	other threads:[~2005-04-24  6:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-14  8:16 Date handling David Woodhouse
2005-04-14  9:00 ` Linus Torvalds
2005-04-14  9:12   ` Linus Torvalds
2005-04-14 17:38     ` David Woodhouse
2005-04-14 19:19       ` tony.luck
2005-04-14 19:23         ` David Woodhouse
2005-04-24  3:04       ` Jan Harkes
2005-04-24  3:33         ` James Purser
2005-04-24  6:38         ` David Woodhouse
2005-04-24  6:43           ` Russ Allbery [this message]
2005-04-25  1:22           ` Jan Harkes
2005-04-25  1:32             ` Russ Allbery
2005-04-14  9:31   ` David Woodhouse
  -- strict thread matches above, loose matches on Subject: below --
2005-04-14 19:42 Luck, Tony
2005-04-14 20:54 ` David Woodhouse
2005-04-14 21:01   ` H. Peter Anvin
2005-04-14 21:48     ` David Woodhouse
2005-04-15  5:02 ` Paul Jackson

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=87r7h0u12e.fsf@windlord.stanford.edu \
    --to=rra@stanford.edu \
    --cc=git@vger.kernel.org \
    /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).