Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Unix.stat on Windows returns timestamps which depend on the DST setting #7385
Original bug ID: 7385
Unix.stat on Windows returns different time stamps (notably the st_mtime field) depending on the DST setting of the machine on which it is executed.
For reference, Unix.stat on Un*x returns an absolute timestamp which is completely independent of any time zone/DST setting.
This bug appears to have existed for some time (it is at least present in 4.02.0), but of course is hard to spot since the bug causes only a 1hr difference in the resulting timestamp and is only present half the year.
We are currently investigating the source of the bug.
Steps to reproduce
$ ocaml unix.cma
Now, change the DST setting on Windows, repeat the above and see how the timestamps have changed by 1hr.