Time discrepancy between Linux and DOS time stamps for same file

Time discrepancy between Linux and DOS time stamps for same file

Post by Joe Co » Sun, 18 Jun 1995 04:00:00



When I look at the time stamp on a dos file using ls in Linux, it reports
a different time than DOS reports for the same file using dir.

This is for the /dosc partition mounted under Linux as a type msdos partition.

The time differential seems to be about 10 1/2 hours; where Linux thinks the
file is 10 1/2 hours older than the DOS time.

Does anyone know a fix or reason for this?

Thanks,


--

 
 
 

Time discrepancy between Linux and DOS time stamps for same file

Post by John M. Morr » Mon, 19 Jun 1995 04:00:00


: When I look at the time stamp on a dos file using ls in Linux, it reports
: a different time than DOS reports for the same file using dir.

: The time differential seems to be about 10 1/2 hours; where Linux thinks the
: file is 10 1/2 hours older than the DOS time.

Bet it ties in with time zones somehow.  I just had a look at my
dos partitions and did not seem to have the problem.  This also fits
from where you are posting in relation to GMT.  Go poking around
with the timezone stuff in /usr/lib/zoneinfo.  Especially look at
time.doc therein.

John M.                        This post was 100% Microsoft Free!

p.s.  Now if someone can tell me why tin refuses to accept a
proper From: field since my last re-install.........

 
 
 

Time discrepancy between Linux and DOS time stamps for same file

Post by Brett Gersekows » Fri, 23 Jun 1995 04:00:00


: When I look at the time stamp on a dos file using ls in Linux, it reports
: a different time than DOS reports for the same file using dir.

: This is for the /dosc partition mounted under Linux as a type msdos partition.

: The time differential seems to be about 10 1/2 hours; where Linux thinks the
: file is 10 1/2 hours older than the DOS time.

: Does anyone know a fix or reason for this?

: Thanks,


: --

As a first guess, I'd hazard that it's due to UNiX time. I'm not sure
whether or not it's implemented the same in Linux - but I see no reason
why it would not be. UNiX system time is measured in seconds wince 12am,
01/01/1970 - Grennwich Mean Time (GMT). That's london time for those of
you who don't already know...

10.5 hours does seem odd for that, though, as would've figured 8 hours to
be the difference between california(forgive me if berkeley ain't in CA -
I'm not an american) and london.

One possible fix could be to set the timezone environment variable. It
was something like TZ or the like. Check in the man pages for localtime()
and the like. At least that may be a start...

Brett.

--
******************************************************************************
* Brett Gersekowski                  *** BAROMETER, n. - An ingenious device *


******************************************************************************