STINNER Victor <[EMAIL PROTECTED]> added the comment: Le Saturday 15 November 2008 04:17:50 Alexander Belopolsky, vous avez écrit : > it is really unnecessary because it can be > written as epoch + timedelta(0, seconds, microseconds).
I tried yesterday and it doesn't work! datetime.datetime(1970, 1, 1, 1, 0) >>> t1 = epoch + timedelta(seconds=-1660000000) >>> t2 = datetime.fromtimestamp(-1660000000) >>> t2 datetime.datetime(1917, 5, 26, 1, 53, 20) >>> t1 - t2 datetime.timedelta(0) >>> t2 = datetime.fromtimestamp(-1670000000) >>> t2 datetime.datetime(1917, 1, 30, 7, 6, 40) >>> t1 = epoch + timedelta(seconds=-1670000000) >>> t1 - t2 datetime.timedelta(0, 3600) We lost an hour durint the 1st World War :-) Whereas my implementation using mktime() works: -1670000000.0 _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2736> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com