UTC equivalent of time.mktime() ?
M.-A. Lemburg
mal at lemburg.com
Thu Apr 18 04:03:09 EDT 2002
Graham Ashton wrote:
>
> On Wed, 2002-04-17 at 17:11, Mark McEahern wrote:
> > Why not just use the mxDateTime library and just do something like this:
> >
> > mx.DateTime.utc().ticks()
>
> I appreciate that I could (and thanks for the suggestion), but does this
> really mean that via the standard library there is no easy way to
> convert "1 Jan 1970" to 0 (i.e. string to seconds since epoch)?
>
> Perhaps I should inspect the mxDateTime code...
Depends on whether your C lib supports leap seconds or not.
See the mxDateTime code for details:
mxDateTime_AsGMTTicksWithOffset()
--
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Company & Consulting: http://www.egenix.com/
Python Software: http://www.egenix.com/files/python/
More information about the Python-list
mailing list