Martin v. Löwis <mar...@v.loewis.de> added the comment: For some reason that I'm unable to follow right now, fstat in the crt does this dance to obtain st_mtime: - obtain time stamps using GetFileInformationByHandle - convert ftLastWriteTime using FileTimeToLocalFileTime to LocalFTime - convert LocalFTime using FileTimeToSystemTime to SystemTime - convert SystemTime using __loctotime32_t to st_mtime
Now, SystemTime is broken-down local time, and loctotime32 converts that to "UTC" using an explicit formula taking the *current* time zone into account. This should work correctly, though, as FileTimeToLocalFileTime also takes into account the current time zone. Anybody analysing this further might want to write a C program that passes explicit time values into this procedure (see Vc/crt/src/fstat.c and dtoxtime.c for the exact source code), to find out what step exactly goes wrong. ---------- nosy: +loewis _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13863> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com