Re: Timestamp problems resolved
Bart Oldeman <[email protected]>
| Newsgroups | gmane.os.freedos.devel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 15 Oct 2002, George Bell wrote:
> However, something that I cannot determine changes
> my system clock as a boot from one os(DOS) to the other(Linux). This
> was the cause of other file problems, sending some files "into the
> future". I believe it has something to do with one of these utilities
> but I'm not sure what.
Unless you use a CLOCK$ replacement that uses UTC instead of localtime
(wall clock time) in DOS you should set Linux to use the local time on
the RTC and not UTC (GMT).
Even then there are problems with vfat/msdos filesystem timestamps in
Linux: the Linux kernel tries to converts those from localtime to UTC
("stat" always reports UTC timestamps), and then the C library can
convert it back to localtime. The problem is that those algorithms are
sometimes different.
The kernel conversion does not take care of daylight saving time for the
date of the file, but the user space conversion does. So likely you have
some file stamps which are off by one hour when rebooting into DOS and it
can also happen that all timestamps on the vfat partition *seem to* change by
one hour when the clocks change. The physical times, and what DOS reports,
don't change, but the times you see in Linux change.
This was the reason for the sudden change of timestamps by exactly one
hour in the FreeDOS kernel zip file last year.
This is a *known* problem with the Linux FAT handling; it appears to be
difficult to solve in a clean fashion.
Bart