shell - Unix time and leap seconds -
regarding unix (posix) time, wikipedia says:
due handling of leap seconds, neither linear representation of time nor true representation of utc.
but unix date command not seem aware of them actually
$ date -d '@867715199' --utc mon jun 30 23:59:59 utc 1997 $ date -d '@867715200' --utc tue jul 1 00:00:00 utc 1997 while there should leap second there @ mon jun 30 23:59:60 utc 1997.
does mean date command ignores leap seconds, while concept of unix time doesn't?
the number of seconds per day fixed unix timestamps.
the unix time number 0 @ unix epoch, , increases 86400 per day since epoch.
so cannot represent leap seconds. os slow down clock accommodate this. leap seconds not existent far unix timestamps concerned.
Comments
Post a Comment