[Numpy-discussion] fixing up datetime

Robert Kern robert.kern@gmail....
Thu Jun 2 11:29:20 CDT 2011

On Thu, Jun 2, 2011 at 11:22, Christopher Barker <Chris.Barker@noaa.gov> wrote:
> Charles R Harris wrote:

>> * Leap seconds probably deserve a rigorous treatment, but having an
>> internal representation with leap-seconds overcomplicates otherwise very
>> simple and fast operations.
> could you explain more? I don't get the issues -- leap seconds would com
> e in for calculations like: a_given_datetime + a_timedelta, correct?
> Given leap years, and all the other ugliness, does leap seconds really
> make it worse?

Yes. Leap years are calculated by a fixed, reasonably efficient
algorithm. Leap seconds are determined by committee every few years
based on astronomical observations. We would need to keep a table of
leap seconds up to date.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the NumPy-Discussion mailing list