Re: What TZ do you use to get right time w/ clockspeed?
Malte Tancred <[email protected]> Thu, 14 Nov 2002 23:11:40 +0100
| Newsgroups | gmane.comp.lib.libtai |
|---|---|
| Message-ID | <[email protected]> |
On thursday, nov 14, 2002, at 22:43 Europe/Stockholm, Paul Jarc wrote: > I've found that some packages' compile-time tests assume a POSIX > clock, so the tests break if they run in a right/ zone. There's definately a lot of software out there that doesn't think a bit about leapseconds. One example is the Apple's Foundation framework (Objective-C class library) that assumes there are 978307200 seconds between 1970-01-01 00:00:00 and 2001-01-01 00:00:00. That value is hardcoded so there's no way you can get the right behaviour even if you change to the right/ zone files. I've sent Apple a bug report of course. :-) http://tancred.com/malte/blog/2002/05/17.html#taiutccocoa > Maybe I was wrong about leapsecs.dat not being a DJB invention. The > data comes from elsie, I think, but I can't find any non-libtai > software that uses that particular file. The glibc sources don't > mention it, AFAICT. The leapsecs.dat is definately a libtai feature: malte% cd libtai-0.60 malte% cat leapsecs.txt # http://pobox.com/~djb/libtai/leapsecs.txt, version 1998-10-13 # # Official sources: # http://maia.usno.navy.mil/leapsec.html # http://hpiers.obspm.fr/webiers/general/earthor/utc/UTC.html # # Dates must be listed in sorted order. # + means a positive leap second, inserting 23:59:60 UTC. # - means a negative leap second, skipping 23:59:59 UTC. # # Note for parsers: Negative leap seconds will probably never happen, but # the year 10000 will happen. Please don't contribute to the Y10K problem. # # 1972-01-01 00:00:00 UTC was 1972-01-01 00:00:10 TAI. # +1972-06-30 +1972-12-31 +1973-12-31 +1974-12-31 +1975-12-31 +1976-12-31 +1977-12-31 +1978-12-31 +1979-12-31 +1981-06-30 +1982-06-30 +1983-06-30 +1985-06-30 +1987-12-31 +1989-12-31 +1990-12-31 +1992-06-30 +1993-06-30 +1994-06-30 +1995-12-31 +1997-06-30 +1998-12-31 The program leapsecs generates a leapsecs.dat from the text file. Cheerio, Malte