[97506] in RedHat Linux List

home help back first fref pref prev next nref lref last post

smbfs and NT file mod. times don't match

daemon@ATHENA.MIT.EDU (Jim Cunning)
Tue Nov 3 13:19:14 1998

Date: Tue, 3 Nov 1998 10:18:48 -0800 (PST)
From: Jim Cunning <jcunning@NTS.cts.com>
To: redhat-list@redhat.com
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

This explanation may be a bit long, sorry.

I am having a problem with the file modification times in files created by
Linux on an NT4.0 server using smbfs.  I am in the Pacific Standard
Timezone (-0800) and both my Linux machine and the NT server are set for
it.  When I create or save a file from Linux to NT, the time looks correct
from Linux, but appears to NT clients to have been created 8 hours in the
future:

-rw-rw-r--   1 jcunning users           5 Nov  3 09:52 testing  <== ls -l

11/03/98  05:52p                       5 testing        <== DOS dir output

Similarly, if I create a file on NT on the NT filesystem, NT will report
the modification time of the new file as the time it was created.  Linux
will see the file's modification time as now - 8 hours.

I looked into this a bit, specifically at /usr/src/linux/fs/smbfs/proc.c,
and found two time conversion routines, local2utc() and utc2local(), that
reference the "sys_tz" structure in the kernel.  I then wrote a small C
program to call "gettimeofday()" and found that my system's timezone
contains zero.  I don't understand why the system timezone should contain
zero and yet when I enter "date; date -u" I get the following:

	Tue Nov  3 10:06:54 PST 1998
	Tue Nov  3 18:06:54 UTC 1998

What am I missing?  FYI, I am running Redhat 4.2, kernel 2.0.35, CMOS
clock is set to UTC, and /etc/localtime is a symlink to
/usr/lib/zoneinfo/US/Pacific-New.

FWIW, Samba does not have a similar problem.  I.e., files created on the
Linux ext2 filesystem by linux or by NT through samba have correct file
modification times and look the same in either environment.

TIA,
Jim


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post