Message153878
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. |
|
Date |
User |
Action |
Args |
2012-02-21 16:44:40 | loewis | set | recipients:
+ loewis, mark.dickinson, pitrou, vstinner, tim.golden, brian.curtin |
2012-02-21 16:44:40 | loewis | set | messageid: <1329842680.9.0.903933171971.issue13863@psf.upfronthosting.co.za> |
2012-02-21 16:44:40 | loewis | link | issue13863 messages |
2012-02-21 16:44:39 | loewis | create | |
|