[LEAPSECS] leapseconds, converting between GPS time (week, second) and UTC
Tom Van Baak
tvb at LeapSecond.com
Tue Jan 15 14:40:07 EST 2019
> Yo Tom!
>
> On Tue, 15 Jan 2019 10:50:10 -0800
> "Tom Van Baak" <tvb at LeapSecond.com> wrote:
>
> > Nope. All minutes have 60 seconds in Excel. And in Windows. And in
> > Unix/POSIX.
>
> Not quite. Check out "man gmtime" for one way that POSIX represents time.
>
> Specifically:
>
> struct tm {
> [...]
> int tm_sec; /* Seconds (0-60) */
>
> gmtime() is perfectly capable of reporting 61 seconds in a minute.
Hi Gary,
Nice to hear from you.
But the underlying time_t cannot represent leap seconds, can it? So how does that gmtime hackery work?
Also, presumably Python is based on POSIX? Does it use time_t or gmtime? Why did Jim's quick Python experiment fail?
/tvb
More information about the LEAPSECS
mailing list