The leap second bug
The leap second bug
Posted Jul 3, 2012 9:38 UTC (Tue) by Tobu (subscriber, #24111)In reply to: The leap second bug by fest3er
Parent article: The leap second bug
If you want to break convention and use TAI64 timestamps rather than POSIX timestamps (which are ambiguous when a leap second is inserted), you can use djb's libtai. Of course, you won't be protected from leap second bugs in the kernel or glibc. And these can only be used internally, but you should already be using RFC 3339 dates for interoperability anyway. Finally you need to maintain your own leap second table without the help of NTP. Or for many uses when the timestamps won't leave your process, you can use clock_gettime with CLOCK_MONOTONIC.
