Leaping seconds and looping servers
Leaping seconds and looping servers
Posted Jul 3, 2012 20:04 UTC (Tue) by kleptog (subscriber, #1183)In reply to: Leaping seconds and looping servers by drag
Parent article: Leaping seconds and looping servers
leap_second_handling = smear|strict
I'd use the 'smear' setting. Alternatively, if there was a syscall that gave me the TAI I might use that. But monotonic time is just one of those assumptions that creeps in very easily.
Interestingly, you could define a smeared time which would be mostly UTC but be convertible exactly to both UTC and TAI on demand. But for me monotonicity is the most important bit really.
Posted Jul 3, 2012 21:47 UTC (Tue)
by lindi (subscriber, #53135)
[Link] (5 responses)
Posted Jul 4, 2012 18:49 UTC (Wed)
by kleptog (subscriber, #1183)
[Link] (1 responses)
Posted Jul 4, 2012 19:38 UTC (Wed)
by lindi (subscriber, #53135)
[Link]
Posted Jul 6, 2012 4:48 UTC (Fri)
by pr1268 (guest, #24648)
[Link] (2 responses)
Why return t + 10;? I'm also curious about the curl braces creating a new scope but no if() / do / while() code. I'm not trying to be critical; just a little curious...
Posted Jul 6, 2012 5:43 UTC (Fri)
by lindi (subscriber, #53135)
[Link] (1 responses)
The new block was just for clarity.
Posted Jul 8, 2012 1:53 UTC (Sun)
by pr1268 (guest, #24648)
[Link]
I was then going to ask why add ten seconds, but then I found out what the ten seconds were about (scroll down to the image titled "Time scales since the cesium atomic frequency standard").
Posted Jul 4, 2012 9:40 UTC (Wed)
by Tobu (subscriber, #24111)
[Link]
Leaping seconds and looping servers
Well, you can demonstrate it fairly easily on the command-line:
Leaping seconds and looping servers
$ TZ="right/UTC" date ; TZ="posix/UTC" date
Wed Jul 4 18:26:24 UTC 2012
Wed Jul 4 18:26:49 UTC 2012
What you need is a library that can easily open multiple timezones at once. I thought glibc could do it, but it doesn't appear to, from reading the source. However, GLib seems to have support. I would have thought the g_time_zone_get_offset() would be enough, but apparently not. Actually, even though I can open both zones I can't convince GLib to give me the answer :(. Though it must be possible.
Leaping seconds and looping servers
tai.c - why return t + 10?
tai.c - why return t + 10?
why t + 10?
Here's a little about libtai. lindi's approach is interesting as well since it uses the leap seconds table implicitly precent in Olson's tzdata, which is already regularly updated in stable distributions.
Leaping seconds and looping servers
