date and time displayed under Windows has a big difference

David Rankin drankin at cox-internet.com
Thu Jan 17 09:12:32 GMT 2002


Paresh:

    I have experienced a time server mismatch that I have never been
able to resolve. With samba acting as a time server and my server
hwclock set to GMT, the time served by Samba appears to apply the
timezone offset in the wrong direction. Here are some of the posts I
have collected and received. I hope some of it is useful to you. If
anyone has some new information on this problem I would be greatful for
a response.

Arvind.KAMATH at esca.com wrote:

> The Samba server runs Compaq Tru64 Unix v5.1 & Samba 2.0.7.  An NT 4.0
client
> creates files on the samba share, to which it is mapped.
> The system time on the two machines is synchronised. Yet, the same
files have a
> timestamp mismatch with the files on the NT client being
> timestamped exactly 6 hours late. I have the 'time server = No' option
set
> globally in the smb.conf file . Whats going on here ?  Is this a known
issue or
> is something out of whack with the configuration ?
>
> I shall appreciate any insight on this.
>
> Thanks,

Arvind?

I have posted this problem numerous times -- with no resulution, I am
including to
contents of my posts below:

Brian Wright wrote:

> David,
>
> I was reading on Deja that you were having difficulties with Linux and

> Windows with the daylight savings.  I'm not sure how you're
experiencing it.
> My problem is when I mount Windows shares on Linux.  The wierd thing
is
> this.  Windows has the correct time set.  Linux has the correct time
set.
> However, whenever I create a file on Windows through an smbmount,
Windows
> sees the file as having been created 1 hour prior to the Windows
current
> time.  Yet, both Linux and Windows are set to the correct time (i.e.,
> daylight savings).  Is this what you are seeing?  If so, how have you
> corrected it (or have you?)
>
> Any info you might have would be appreciated.
>

Brian my problems are slightly different but certainly qualify as "wonky
time."
My problem is with Mandrake 7.2 (stock - installed via ISO image) and
Samba 2.07
(stock - installed via same ISO image) when Samba is acting as a time
server. I
can't set my Hardware clock to GMT and get Samba to serve the correct
time.
Whenever I set my hardware clock to GMT and properly config my timezone
files,
Samba serves time to my Windows machines that is either GMT (with
localtime set
to [no selection]) or GMT + 5 hours (with localtime set to
[America/Chicago]).
The only way I can get Samba to serve the right time is to set my
hardware clock
to CDT (with localtime set to [America/Chicago]).

Now Samba serves the correct time to the WinXX machines, but if I send
mail from
kmail on my Linux box, all of my e-mail is time stamped CDT-5hr. or GMT.
Go
figure? Somewhere an offset is getting applied in the wrong direction. I
still
haven't sorted this out, but I am still working on it as time permits.

I sure wish someone had some additional ideas on this....

Andrew Bartlett wrote:

> (I continued thinking on this issue after our last exchange, but never

> commited it to words, so here goes:)
>
> The only thing I can think has happend is that samba starts before the

> timezone is set.  I don't have the foggiest how that could happen, but

> you might try running a preexec script that checks the timezone
> variables, and see what they say.  You could also try manualy setting
> the timezone in the /etc/init.d/smb file.  (As to how to do these
> things, I'm not entirly sure).
>
> Andrew Bartlett
> --
> Andrew Bartlett
> abartlet at pcug.org.au

Hello Andrew, thanks for the idea. This is really the first logical
sounding
explanation for the timeserver problem I'm dealing with. The localtime
soft link
does effect what Samba sends (I can change it and see that samba serves
different
times). The problem has been that the time Samba sends just makes no
sense. The explanation
that Samba doesn't know the correct offset to begin with really fits
with my
problem. I will dig into the start up and try to find out where the
timezone config is
taking place with respect to where samba is getting started.

"paresh.thakur" wrote:

> Hi,  I am using Samba Version 2.0.7 on RS6000 running AIX 4.x. When I
> View files from Samba share on Windows NT or Windows 2000, date and
> time displayed under Windows has a big difference, can some one help
> me solve this problem. Thanks Paresh Thakur

--
David C. Rankin, J.D., P.E.
RANKIN * BERTIN, PLLC
1329 N. University, Suite D4
Nacogdoches, Texas 75961
(936) 715-9333
(936) 715-9339 fax






More information about the samba mailing list