[Numpy-discussion] fixing up datetime

Mark Dickinson mdickinson@enthought....
Mon Jun 6 02:16:44 CDT 2011

On Thu, Jun 2, 2011 at 5:42 PM, Mark Wiebe <mwwiebe@gmail.com> wrote:
> Leap years are easy compared with leap seconds. Leap seconds involve a
> hardcoded table of particular leap-seconds that are added or subtracted, and
> are specified roughly 6 months in advance of when they happen by
> the International Earth Rotation and Reference Systems Service (IERS). The
> POSIX time_t doesn't store leap seconds, so if you subtract two time_t
> values you may get the wrong answer by up to 34 seconds (or 24, I'm not
> totally clear on the initial 10 second jump that happened somewhere).

Times in the future would be hairy, too. If leap seconds are
supported, how many seconds are there in the timedelta:

    2015-01-01 00:00:00  -  2010-01-01 00:00:00

?  Is it acceptable for the result of the subtraction like this to
change when the leap second table is updated (e.g., to reflect a newly
added leap second on June 30th, 2012)?


More information about the NumPy-Discussion mailing list