From: Krzysztof Halasa Date: Mon, 02 May 2005 22:10:45 GMT Subject: Re: Trying to use AUTHOR_DATE Message-ID: In-Reply-To: <1114865964.24014.77.camel@localhost.localdomain> David Woodhouse writes: > During a leap second, won't tm_sec be 60? You could rather have two 59th seconds. Or the "seconds" could be, say, 0.1% longer for 1000 s. Depends on synchronization mechanism. I think 60th second could only be possible with leap-seconds aware things (NTP, GPS, reference radio clocks etc.). > And in fact you don't seem to > handle leap seconds at all, so isn't my_mktime going to be out by one > second for every leap second which has occurred since 1970? No, actually the system time (i.e., the number of seconds since 1970) is already corrected (minutes are seconds/60, hrs = minutes/60 etc.) You are off calculating time deltas, but I guess if you need such accuracy your software already knows about leap seconds. -- Krzysztof Halasa