New submission from Garrett Cooper: Windows doesn't return sane values for localtime(3) (per POSIX [1]) when the BIOS is set to the local time (the host is a Win2k8-R2 machine):
$ python -V; python -c 'import time; print time.strftime("%m-%d-%y %H:%M:%S", time.localtime())'; date; uname -a Python 2.6.1 09-13-12 19:56:03 Thu, Sep 13, 2012 11:56:03 AM CYGWIN_NT-6.1-WOW64 QAQA-ORPTO8B466 1.7.11(0.260/5/3) 2012-02-24 14:05 i686 Cygwin This seems to be a conscious design choice on Microsoft's part: http://msdn.microsoft.com/en-us/library/windows/desktop/ms724961%28v=vs.85%29.aspx I'll try and follow this up with the POSIX folks or maybe Microsoft, but for the time being this needs to be documentation as an issue with downstream consumers (perl 5.8.9 also illustrates this issue). ---------- components: Library (Lib) messages: 170453 nosy: yaneurabeya priority: normal severity: normal status: open title: Time representation for Windows incorrect when BIOS clock set to localtime when calling time.localtime() type: behavior versions: Python 2.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15942> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com