Overview
| Artifact ID: | e62f7c3afd6aa82683cda6c9e9d626a7495cf232 |
|---|---|
| Ticket: | 2796593fffffffffffffffffffffffffffffffff
clock broken when time_t tracks leapseconds |
| User & Date: | kennykb on 2009-05-26 08:40:13 |
Changes
- icomment:
The symptoms look as if someone configured /etc/localtime to point to a time zone in /usr/share/zoneinfo/right. This will cause the system library to return a count of seconds from the Epoch that includes all the leap seconds that have been added to the clock since then - making it 34 seconds (your system shows 33, so it probably missed the last one) different from UTC. Some timekeeping folk think that tracking the leap seconds is ideal behaviour, but it is NOT what Posix specifies, which is why the 'right' time zones aren't enabled by default. Tcl depends on Posix behaviour; its model of leap seconds is to accept the jump and smooth over it. http://www.cl.cam.ac.uk/~mgk25/uts.txt gives the basic idea. Ignoring leap seconds has compelling advantages for calculation, and very few disadvantages in day-to-day usage. Unless you can get your system clock back to Posix compliance, I'm afraid that the localtime conversion is likely to continue to be 33 (34?) seconds off.
- login: "kennykb"
- mimetype: "text/plain"
- username: "kennykb"