News for hackers. Stuff that matters.
Re:Dealing with Timezones in Python by nikcub on Friday July 15, 2011 @09:48AM (#2767334)
it does, but it assumes that the timestamp you are giving it is from your current timezone. compare:

    >>> time.mktime(datetime.datetime.now().utctimetuple())
    1310737652.0
    >>> int(datetime.datetime.utcnow().strftime('%s'))
    1310701659
my local timezone is +10, and mktime is adding it back in, hence why I always use strftime

There are no comments on this comment yet.