Is there no inversion of gmtime()?

Dparsavand dparsavand at aol.com
Tue Jun 20 21:10:50 EDT 2000


Looking throught the time module, I'm surprised that there doesn't seem to be a
way to go from the known date in UTC to the number of seconds since the epoch.
There is an inverse function of localtime() which I don't think is what I want
in order to compare two dates such as:
07 May 2000 03:45:33 -0800
07 May 2000 04:33:33 -0400 
for example.  I was just going to convert these dates to gmtime in seconds
since the epoc. Sure, I could write my own program to do this but I figured
Python would make it easier for me. Am I missing something?

In playing with gmtime(), I was also very suprised that it won't accept
negative arguments - why? 

Thanks, Dara (who definitely preferred the name 2.0 to 3000)



More information about the Python-list mailing list