[erlang-questions] File creation times under Windows
Mon Oct 27 21:56:40 CET 2008
NTFS stores time properly in UTC. FAT/FAT32 stores in local time. Either
way, time should be displayed in local time when file:read_file_info/1 is
I did a little digging into the driver code an to appears the the
FileTimeToLocalTime Win32API to convert the time. I suspect it is this API
call that is the root of the problem. I don't have a Windows platform to
test on, so I can't dig any further, but there is a discussion
explain the problem more.
2008/10/27 Johnny Billquist <>
> John Hughes wrote:
> > I would have expected that, once a file has been created, then its
> > time should remain constant (unless explicitly modified)--wouldn't you?
> > so! At least, not under Windows. Under both XP and Vista, the file
> > time reported by file:read_file_info changes by an hour when daylight
> > time ends (and presumably also when it begins)!
> > File system design according to the Principle of Greatest Astonishment,
> > evidently.
> I believe that's a basic problem with windows, since it don't actually
> keep time in UTC, but local time, internally.
> In short: if you use Windows, that's the way it is. Don't have anything
> to do with Erlang.
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions