4 ms·
Ok, I oversimplified. UTC time does not go backwards, but the value returned by POSIX time(3) -- which is supposed to be the number of seconds since 1970-01-01
by cperciva 14y ago
Ok, I oversimplified. UTC time does not go backwards, but the value returned by POSIX time(3) -- which is supposed to be the number of seconds since 1970-01-01 00:00:00 UTC -- does. (Assuming you have sub-second precision, of course; time_t isn't required to be an integer type, and there's other APIs which access the same UTC-seconds clock and provide microsecond or nanosecond precision.)
- deleted 14y ago[deleted]
- maggit 14y agoThe value returned by POSIX time is commonly said to be "POSIX time" or "UNIX time". This names a time system other than UTC. In my experience, programmers don't seem to confuse these two systems. I have seen good programmers be surprised by the fact that POSIX time goes backwards in the event of leap seconds, as I was when I learned it. I think it would have at least as much punch if you edited your "falsehood 2" to be about UNIX time instead of UTC. As a bonus, you would also be correct ;)
- cperciva 14y agoYeah, I should have just said UNIX time.