[97530] in RedHat Linux List

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

Re: smbfs and NT file mod. times don't match

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

Date: Tue, 3 Nov 1998 11:49:51 -0800 (PST)
From: Jim Cunning <jcunning@NTS.cts.com>
To: Nikki Cook <sunny@mail.suntrix.com>
cc: redhat-list@redhat.com
In-Reply-To: <199811031850.NAA31962@shell.suntrix.com>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

Nikki,

Thanks, but I'm sure that the BIOS clock is set to UTC and that
/etc/sysconfig/clock contains "UTC=true" and "ARC=false"  I only use this
system with Linux and time on that system is correct.  It's the time on
files written from that system to NT using smbfs that gets screwed up. 

On Tue, 3 Nov 1998, Nikki Cook wrote:

> Hi Jim,
> 
> I had a time problem as well, but we're running 5.1 and it required a
> different solution, which worked for us...
> 
> I found this in Red Hat Linux Installation Support FAQ: System
> Administration.  Hope it helps.
> 
> 9.13 More problems with time 
> 
> Common Symptoms of Problem 
> 
> I have all the latest updates installed, but my programs still get the
> incorrect time.
> 
> Versions Affected by Problem 
> 
> All
> 
> Probable Answer 
> 
> If you have installed all the latest updates and you programs still get the
> incorrect time, try checking the settings
> in /etc/sysconfig/clock. They probably look something like this:
> 
>      UTC=true
>      ARC=false
> 
> This means that Linux will assume that your BIOS clock is set to the UTC or
> GMT timezone. More than likely,
> the clock is set to your local timezone, and you need to change the UTC
> line to be
> 
>      UTC=false
> 
> At 10:18 AM 11/3/98 -0800, you wrote:
> >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