Author belopolsky
Recipients aht, amaury.forgeotdarc, belopolsky, djc, hodgestar, mark.dickinson, pr0gg3d, zooko
Date 2010-06-06.01:15:07
SpamBayes Score 0.000230098
Marked as misclassified No
Message-id <>
With recent enhancements to datetime module, timegm has become a 1-liner:

EPOCH = 1970
_EPOCH_DATETIME = datetime.datetime(EPOCH, 1, 1)
_SECOND = datetime.timedelta(seconds=1)

def timegm(tuple):
    """Unrelated but handy function to calculate Unix timestamp from GMT."""
    return (datetime.datetime(*tuple[:6]) - _EPOCH_DATETIME) // _SECOND

I suggest committing modernized implementation to serve as a reference and encourage people to use datetime module and datetime objects instead of time module and time tuples.
Date User Action Args
2010-06-06 01:15:12belopolskysetrecipients: + belopolsky, zooko, amaury.forgeotdarc, mark.dickinson, djc, hodgestar, pr0gg3d, aht
2010-06-06 01:15:11belopolskysetmessageid: <>
2010-06-06 01:15:09belopolskylinkissue6280 messages
2010-06-06 01:15:09belopolskycreate