Falsehoods programmers believe about Unix time
I’m not convinced this article is correct.<p>Posix defers to ISO C where they differ:  <a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf" rel="nofollow">http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf</a><p>See page 391.  The encoding of Unix time is explicitly unspecified there.<p>Posix goes on to say:  <a href="http://pubs.opengroup.org/onlinepubs/9699919799/" rel="nofollow">http://pubs.opengroup.org/onlinepubs/9699919799/</a><p>“ The time() function shall return the value of time [CX] [Option Start]  in seconds since the Epoch. [Option End]”<p>So, Unix time is optionally seconds since the epoch, with no further guidance about leap seconds.<p>Also, the spec makes it clear that time_t needs to be converted into the appropriate time zone, which suggests it does not reflect leap seconds.<p>I’d be convinced by source code or documentation for both BSD and Linux showing they’re intentionally not posix compliant on this front, and apply leap seconds to Unix ticks and not their time zone conversions.