From: mal at lemburg.com (M.-A. Lemburg)
Date: Fri, 30 Apr 1999 16:04:05 +0200
Subject: mktime() like function to produce GMT?
References: <00be01be9308$c649cf60$0301a8c0@cbd.net.au>
Message-ID: <3729B855.3A7C6B5A@lemburg.com>
X-UID: 175                                                  

Mark Nottingham wrote:
> 
> I need a function to produce a Unix epoch time from a time tuple, a la
> time.mktime(). Problem is, mktime() gives you the tuple in localtime, which
> is dangerous if you're dealing with GMT times in the past (like in the
> HTTP).
> 
> Is there a function that will make a GMT epoch time straight from a time
> tuple?

On some platforms there is gmtime() which does exactly this.

It's available through mxDateTime, BTW, which also offers a
work-around solution for those platforms where it is not
available. See the Python Pages below.

-- 
Marc-Andre Lemburg                               Y2000: 245 days left
---------------------------------------------------------------------
          : Python Pages >>> http://starship.python.net/~lemburg/  :
           ---------------------------------------------------------





