Re: Trying to use AUTHOR_DATE
- From
- Krzysztof Halasa <khc@pm.waw.pl>
- Date
- May 2, 2005, 22:10 UTC
- Message-ID
- <m3wtqhe0t6.fsf@defiant.localdomain>
- In-Reply-To
- <1114865964.24014.77.camel@localhost.localdomain>
David Woodhouse <dwmw2@infradead.org> 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