This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author tebeka
Recipients tebeka
Date 2008-05-01.21:03:24
SpamBayes Score 0.072236806
Marked as misclassified No
Message-id <1209675808.9.0.995048704016.issue2736@psf.upfronthosting.co.za>
In-reply-to
Content
If you try to convert datetime objects to seconds since epoch and back
it will not work since the microseconds get lost:

>>> dt = datetime(2008, 5, 1, 13, 35, 41, 567777)
>>> seconds = mktime(dt.timetuple())
>>> datetime.fromtimestamp(seconds) == dt
False

Current fix is to do
>>> seconds += (dt.microsecond / 1000000.0)
>>> datetime.fromtimestamp(seconds) == dt
True
History
Date User Action Args
2008-05-01 21:03:29tebekasetspambayes_score: 0.0722368 -> 0.072236806
recipients: + tebeka
2008-05-01 21:03:28tebekasetspambayes_score: 0.0722368 -> 0.0722368
messageid: <1209675808.9.0.995048704016.issue2736@psf.upfronthosting.co.za>
2008-05-01 21:03:25tebekalinkissue2736 messages
2008-05-01 21:03:24tebekacreate