Extended date and time
jeremy+complangpython at jeremysanders.net
Mon Nov 12 10:46:42 CET 2007
John Machin wrote:
> What does "dates in the past" mean?? Please be more specific about the
> earliest date that you want to be able to handle. Python's datetime
> starts at 0001-01-01. Somebody mentioned the time module, which is
> implementation-dependent but typically starts at 1970-01-01 .
> What functionality do you need, other than two-way conversion between
> days_since_epoch and (proleptic Gregorian) date/time?
I want to convert between seconds from the epoch (let's say 1970 in floating
point) and date and time. I also want it to work across all platforms.
Is there any way to convert a datetime into seconds from a certain date? Is
the most robust way of doing it just to subtract two datetime objects and
turn the timedelta into a floating point number?
More information about the Python-list