Re: git.git object database at kernel.org?
- From
- H. Peter Anvin <hpa@zytor.com>
- Date
- Apr 26, 2005, 01:05 UTC
- Message-ID
- <426D93E9.10407@zytor.com>
- In-Reply-To
- <Pine.LNX.4.58.0504251756190.18901@ppc970.osdl.org>
Linus Torvalds wrote:
Show 9 quoted lines
> > On Mon, 25 Apr 2005, H. Peter Anvin wrote: > >>Oh well. If you have the offset, the algorithm is fully arithmetric and >>doesn't rely on the zoneinfo system, so it can be trivially implemented. > > You have a different definition of "trivial" than I do. I have not a > frigging clue how to handle leap seconds etc ;) >
Leap seconds don't exist in the POSIX time_t universe, so they always obey:
... + 3600*hour + 60*min + sec
... which means that during a positive leap second, time_t remains unchanged for 2 seconds, and for a negative leap second time_t jumps. Thus, the difference between two time_t doesn't always match the exact number of seconds between those two points in time.
Show 10 quoted lines
> >> And again, curl_gettime() does handle the whole string to time_t >>conversion of the common formats. > > I don't doubt you, I just would prefer to not rely on boutique libraries > too much. > > Yeah, we already use it for http-pull, so I guess it's moot, but at least > that felt less like a core command.. >
If we're already using libcurl, we might as well. Otherwise, I'd just rip out curl_gettime from the libcurl sources.
-hpa