
On Wed, Jan 07, 2015 at 02:50:21PM +1300, GJB wrote:
Interesting that the leap day at end of Feb every 4 years is not an issue but the leap second is? Seems arbitrary that one time unit proves problematic but another doesn't.
It is unusual for software with dates not to program the extra day in February for leap years as it is a straightforward calculation to determine when it applies, whereas much software cannot cope with 61s in a minute despite the C library standard functions explicitly stating that valid values for the seconds field (in broken down time) include 60. A further complication is that the tzdata must be up to date for the C library to be able to convert from Unix time (a single integer for the number of seconds since the epoch) to a time zone, that is, the C library must be told about the presence of the leap second as it cannot be algorithmically predicted. If the tzdata have not been recently updated it is quite possible that a system will not know about the leap second and thus convert times subsequent to the leap second incorrectly. Cheers Michael.