a commandline program i am writing accepts dates as arguments. i need to convert these to a utc unix timestamp for internal use within the program. so far i have the following test script, but its not working:
>>> import time
>>> from dateutil import parser
>>> t = parser.parse("2009-01-10")
>>> print int(time.mktime(t.timetuple()))
1231507800
checking this on unixtimestamp.com:
1231507800
Is equivalent to:
01/09/2009 @ 1:30pm (UTC)
however i want it back at midnight. i think my computer is using my local timezone, when i want to use utc at every stage.