From: mal at lemburg.com (M.-A. Lemburg)
Date: Thu, 15 Apr 1999 15:49:17 GMT
Subject: timezone stuff driving me bonkers!!!
References: <371604B6.C6267011@quantisci.co.uk>
Message-ID: <37160A7D.72AD2893@lemburg.com>
X-UID: 881                                                  

Stephen Crompton wrote:
> 
> Pretty obvious from the header I guess.
> 
> I want to convert from a UTC tuple to the time since the epoch. As far
> as I can tell this should definitely be timezone, DST, etc. independent.
> However, there is a notable absence of this functionality in the time
> module (presumably due to C library absences ?)

Try the utc2local() function in mxDateTime (an extension package
which can download from my Python Pages).

It will convert a DateTime instance using UTC values to a
DateTime instance using local time. The .ticks() method on
that instance will get you the time since epoch value.

Cheers,
-- 
Marc-Andre Lemburg                               Y2000: 260 days left
---------------------------------------------------------------------
          : Python Pages >>> http://starship.skyport.net/~lemburg/  :
           ---------------------------------------------------------





