Re: What TZ do you use to get right time w/ clockspeed?
[email protected] (Paul Jarc) Thu, 14 Nov 2002 16:43:30 -0500
| Newsgroups | gmane.comp.lib.libtai |
|---|---|
| Organization | What did you have in mind? A short, blunt, human pyramid? |
| Message-ID | <[email protected]> |
Bennett Todd <[email protected]> wrote: > Since this approach is tilting at POSIX, it may possibly break other > things. I've found that some packages' compile-time tests assume a POSIX clock, so the tests break if they run in a right/ zone. (The packages themselves run fine, IME.) I can't think of any maintainers who have been willing to add TZ=UTC to the test scripts so they'll run correctly, so I've had to do it myself. grep for TZ: <URL:http://multivac.cwru.edu./spf/sp-foreign> > The other approach, according to Greg Black, and I just tested and > it also seems to work, is to leave your TZ alone, as provided by the > vendor, POSIXly busted, and remove leapsecs.dat, which will reset > clockspeed to be blind to leap seconds, which seems to leave it > operating consistently then with POSIX. I haven't tested this a lot, > but a quick try indicates that it works. This will break libtai. # echo $TZ; \ > DELAY=1 HOUR==22 caldelay sh -c 'date -d "+$DELAY seconds"'; \ > mv leapsecs.dat{,-}; \ > DELAY=1 HOUR==22 caldelay sh -c 'date -d "+$DELAY seconds"'; \ > mv leapsecs.dat{-,} right/US/Eastern Thu Nov 14 17:00:00 EST 2002 Thu Nov 14 16:59:38 EST 2002 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. paul