datetimes, tzinfo and gmtime epoch
Robert Brewer
fumanchu at amor.org
Fri Apr 16 19:31:37 EDT 2004
John Hunter wrote:
> Robert> John Hunter wrote:
> >> I have a python2.3 datetime instance and a tzinfo instance (eg
> >> Eastern from the python library reference).
> >>
> >> What is the best way to convert that datetime instance to
> >> seconds since the epoch, gmtime?
>
> Robert> You might try time.mktime(t), where t is a 9-tuple as
> Robert> desribed at:
>
>
> Yes, but you still have to account for the offset to gmtime, which is
> dependent on daylight savings time.
Sometimes I settle for giving general directions, not free rides. :D
FuManChu
More information about the Python-list
mailing list