Extended date and time
vel.accel at gmail.com
Sun Nov 11 22:46:52 CET 2007
On Nov 10, 10:37 am, Jeremy Sanders <jeremy
+complangpyt... at jeremysanders.net> wrote:
> Hi - I need to add support to a program for dates and times. The built-in
> Python library seems to be okay for many purposes, but what I would like
> would be Unix epoch style times (seconds relative to some date), covering a
> large period from the past to the future. What would be nice would be a
> library which can take floating point seconds from an epoch.
> Does anyone know of a library which can convert from human style dates and
> times to a floating point epoch and back again? I expect I could fudge the
> fractional seconds with the built-in library, but I can't see how to get
> dates in the past.
> Thanks, Jeremy.
> Jeremy Sandershttp://www.jeremysanders.net/
Have you looked at mx.DateTime:
In matplotlib, I also use their Dates modules functions for
conversions (see the near bottom of the page):
In the scipy sandbox, you can also build a package called
I also have trouble with date/times with whats available. Off the top
of my head... converting a numpy array of epochs to some datetime
object and back.
If I had the time I'd contribute additional functionality to Pierre's
and Matt's TimeSeries module (the one in scipy).
More information about the Python-list