|
|
Subscribe / Log in / New account

Leaping seconds and looping servers

Leaping seconds and looping servers

Posted Jul 4, 2012 18:49 UTC (Wed) by kleptog (subscriber, #1183)
In reply to: Leaping seconds and looping servers by lindi
Parent article: Leaping seconds and looping servers

Well, you can demonstrate it fairly easily on the command-line:

$ 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.


to post comments

Leaping seconds and looping servers

Posted Jul 4, 2012 19:38 UTC (Wed) by lindi (subscriber, #53135) [Link]

Thanks for the pointer! If we had an easy way to get TAI I'd seriously consider using it in our internal systems since many parts already assume they can use simple substraction to get lengths of time intervals.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds