4 ms·
> All system time in Linux is tracked in seconds past Jan 1, 1970. > If your application is time sensitive and not looking for a literal time traveling event..
by joshspankit 4y ago
> All system time in Linux is tracked in seconds past Jan 1, 1970.
> If your application is time sensitive and not looking for a literal time traveling event...
One of my least-favourite facts is that these statements are misleading. Since Linux uses UTC and not TAI, it no longer tracks an absolute measurement of seconds since the unix epoch as it takes “leap seconds” in to account. As well, because of leap-seconds you can absolutely have time-travelling events.
https://developers.redhat.com/blog/2015/06/01/five-different-ways-handle-leap-seconds-ntp https://developers.redhat.com/blog/2015/06/01/five-different...
- masklinn 4y ago> Since Linux uses UTC and not TAI Unix, not linux. I don’t even think they can track TAI, but I definitely have never seen one which does, they all define unix time as 86400*days since epoch + seconds since midnight.
- bitcharmer 4y agoOn Linux the clock_gettime syscall can absolutely return TAI with CLOCK_TAI