Antoine Pitrou added the comment: 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) ---------- nosy: +belopolsky, pitrou Added file: http://bugs.python.org/file36907/mkbug.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22627> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com