On Nov 12, 8:46 pm, Jeremy Sanders wrote:
> 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
> > implementatio
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 .
>
On Nov 11, 2:37 am, Jeremy Sanders 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 pas
On Nov 11, 4:46 pm, "D.Hering" <[EMAIL PROTECTED]> wrote:
> On Nov 10, 10:37 am, Jeremy Sanders
> 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 additi
On Nov 10, 10:37 am, Jeremy Sanders 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 pa
Adam Pletcher wrote:
> The "time" module in the standard library does epoch, and conversions.
>
> Get current local time in seconds since epoch (1970):
>
>> >> import time
>> >> now_secs = time.time()
>> >> print now_secs
> 1194790069.33
>
> Convert to a struct_time object for conversions:
>
The "time" module in the standard library does epoch, and conversions.
Get current local time in seconds since epoch (1970):
>>> import time
>>> now_secs = time.time()
>>> print now_secs
1194790069.33
Convert to a struct_time object for conversions:
>>> now_struct = time.localtime(now_secs)