News for hackers. Stuff that matters.

meltingwax

Re:Maya – Python Datetimes for Humans on Sunday December 18, 2016 @08:29PM (#13208837)
Thanks for clarifying my statement!
Re:Maya – Python Datetimes for Humans on Sunday December 18, 2016 @02:35PM (#13207173)
Here's an example:

I have packets read from an instrument which are timestamped in seconds since 1980-01-06 (GPS Epoch). To compute each packet's proper datetime representation in TAI, I need add those seconds to 1980-01-06, and subtract the amount of leap seconds that occurred. The subtracting of leap seconds could be done automatically by a library. When a leap second is added, it will occur on the 61st second of the minute (second = :60). These times aren't supported by the datetime class.

Re:Maya – Python Datetimes for Humans on Sunday December 18, 2016 @02:30PM (#13207150)
When the mapping between a time_t and a "human readable format" (hours, minutes, seconds, etc) takes into account extra leap seconds. You could use time_t underneath, if that's what you really wanted to do.

As my co-worker once put it, "time is a four letter word."

At the very least, there is a need for showing the occasional 61st second of a minute, and adding a time and timedelta where leap seconds is taken into account.

Re:Maya – Python Datetimes for Humans on Sunday December 18, 2016 @04:46AM (#13205100)
This is designed for programmers of user facing applications. For science and engineering, it does not address the problems, eg lack of leap seconds.
Re:McDonald's Faces 'Millennial' Challenge on Monday August 25, 2014 @08:24PM (#8225008)
Have to log in to get the full story...