Re: Wrong time in git-log when using right/ timezone

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Junio C Hamano <gitster@...>
Cc: Linus Torvalds <torvalds@...>, Peter Hartlich <wwsgj@...>, <git@...>
Date: Wednesday, July 25, 2007 - 4:03 pm

On Wed, Jul 18, 2007 at 13:57:13 -0700, Junio C Hamano wrote:

I can attempt a brief explanation if anyone is (still) interested.

Leap seconds are added iregularly, because Earth rotation is slightly
irregular. Therefore some time calculations require lookup into a table of
leap seconds:
 - If you include leap seconds in the timer, converting to date+time does,
   while time difference does not. This is what the right/ timezones use.
 - If you exclude leap seconds from the timer, time difference does, but
   converting to date+time does not. This is what the normal timezones use.

Obviously, the two approaches don't play well together. POSIX chose the
later, likely because it's much more common to want to know date+time for
some moment, than to calculate several year long time interval with second
precision (because so far there have been at most 2 seconds difference per
year).

Note, that the former approach allows you to talk about time 65936023 secon=
ds
=66rom now, but not what date and time it will be, while the later allows y=
ou
to talk about 2437-11-05 16:12:05, but not how many seconds are left until
than.

--=20
						 Jan 'Bulb' Hudec <bulb@ucw.cz>
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Wrong time in git-log when using right/ timezone, Peter Hartlich, (Wed Jul 18, 11:36 am)
Re: Wrong time in git-log when using right/ timezone, Linus Torvalds, (Wed Jul 18, 1:01 pm)
Re: Wrong time in git-log when using right/ timezone, Junio C Hamano, (Wed Jul 18, 4:57 pm)
Re: Wrong time in git-log when using right/ timezone, Jan Hudec, (Wed Jul 25, 4:03 pm)
Re: Wrong time in git-log when using right/ timezone, Alex Riesen, (Wed Jul 18, 4:29 pm)
Re: Wrong time in git-log when using right/ timezone, Julian Phillips, (Wed Jul 18, 1:55 pm)
Re: Wrong time in git-log when using right/ timezone, Linus Torvalds, (Wed Jul 18, 2:19 pm)
Re: Wrong time in git-log when using right/ timezone, Peter Hartlich, (Wed Jul 18, 12:04 pm)