You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To account for daylight saving time when converting a file time to a local time, use the following sequence of functions in place of using FileTimeToLocalFileTime:
FileTimeToSystemTime
SystemTimeToTzSpecificLocalTime
SystemTimeToFileTime
Thanks for pointing this out. I agree this appears to be a duplicate. I had searched on "stat" and other terms but nothing had come up; perhaps I was not using the search feature correctly.
(I use the google search "site:caml.inria.fr/mantis unix.stat windows". But no criticism here! I am subscribed to the bugtracker emails, so I did remember about the issue; it's much easier to find something when you already know it exists.)
Original bug ID: 7569
Reporter: markghayden
Assigned to: @gasche
Status: resolved (set by @gasche on 2017-06-27T02:01:00Z)
Resolution: duplicate
Priority: normal
Severity: minor
Platform: AMD64
OS: MacOS
OS Version: 10.12.2
Version: 4.04.0
Fixed in version: 4.04.2
Category: otherlibs
Duplicate of: #7385
Bug description
stat.c in otherlibs/win32unix has the following code for converting file times:
The MSDN docs (https://msdn.microsoft.com/en-us/library/windows/desktop/ms724277%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396) say the following:
Remarks
To account for daylight saving time when converting a file time to a local time, use the following sequence of functions in place of using FileTimeToLocalFileTime:
FileTimeToSystemTime
SystemTimeToTzSpecificLocalTime
SystemTimeToFileTime
Steps to reproduce
See attached test file.
Additional information
Output on MacOS is correct:
time0 =1498527385.21647906
time0a=1498527385.00000000 (-0.21647906)
time1 =1498527385.00000000 (-0.21647906)
time2 =1498527385.21670294 (+0.00022388)
Output on Windows is incorrect:
time0 =1498528190.84126230
time0a=1498528190.00000000 (-0.84126234)
time1 =1498513790.00000000 (-14400.84126234) <<<<<<<<<<<<<<<<<<<<
time2 =1498528190.84126230 (+0.00000000)
File attachments
The text was updated successfully, but these errors were encountered: