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 pitrou
Recipients barry, belopolsky, pitrou, thomir, veebers
Date 2014-10-14.07:58:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1413273509.89.0.300114217746.issue22627@psf.upfronthosting.co.za>
In-reply-to
Content
This has nothing to do with the datetime module. Attached script reduces the issue to a bug (?) in time.mktime() with the corresponding timezone. time.mktime() is a thin wrapper around the C library's mktime() function, so it is probably not a bug in Python at all.

Note your script is fixed by removing ".replace(tzinfo=None)". It seems conter-productive to take the pain to create an aware timezone and then make it naive, IMHO. datetime.timestamp() falls back on time.mktime() when the datetime is naive (i.e. it asks the OS to do the computation).

(I did my tests under Ubuntu 13.10, btw)
History
Date User Action Args
2014-10-14 07:58:30pitrousetrecipients: + pitrou, barry, belopolsky, thomir, veebers
2014-10-14 07:58:29pitrousetmessageid: <1413273509.89.0.300114217746.issue22627@psf.upfronthosting.co.za>
2014-10-14 07:58:29pitroulinkissue22627 messages
2014-10-14 07:58:29pitroucreate