Re: Timestamp problems resolved

George Bell <[email protected]>
Newsgroups gmane.os.freedos.devel
Message-ID <[email protected]>
Bart Oldeman wrote:

>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.
>

That's an interesting point.  But my clock was changing by days, months, 
and even years!
Eric suggested that maybe something has gone awry with my CMOS battery, 
but that is
unlikely, since my computer is only about one year old.  And I never 
noticed these problems
running in Linux.

>
>This is a *known* problem with the Linux FAT handling; it appears to be
>difficult to solve in a clean fashion.
>
>Bart
>
>----------
>list options/archives/etc.: http://www.topica.com/lists/fd-dev
>unsubscribe: send blank email to: [email protected]
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.