times off by one hour

Norbert Püschel Pueschel.Norbert at Walzbarren-VAW.ne.uunet.de
Tue Aug 11 12:44:57 GMT 1998

Andrew Tridgell schrieb:
> > My Samba Servers are running on Solaris 2.6. I doubt it are the
> > timezone files. Furthermore, I just switched the date on my NT-Box to
> > be outside the DST-period, and the time difference got worse, now being
> > two hours ...
> You need to send _precise_ ways to reproduce the problem. Then I can
> easily fix it. By precise I mean not things like "create a file and
> look at the timestamp under NT". I mean things like "create a file on
> the Samba 1.9.18p8 server then match the time with the time shown by
> filemanager under NT4.0SP3 when you right click and select properties
> for the file and look at the last modify time".
> Sorry to be so fussy. When I last chased timestamp problems I spent
> ages trying to interpret vague bug reports. There are a _huge_ number
> of permutations on how timestamps are handled in the SMB protocol and
> often the one action (like selecting "properties") will exercise half
> a dozen permutations at once. If you don't give precise instructions I
> can't help.

That's OK. I just wanted to have the attention of the right people
first. :-) Now let's see:

The fileservice date problem:

- Samba 1.9.18p8 on Solaris 2.6 (SPARC)
- NT 4 SP 3
- The dates of _all_ files and directories when viewed via the NT
  Explorer (Detail) are off by one hour relative to the real file
  date (as given by ls -l on the Solaris host). An Example:

  NT Explorer: 27.05.98 10:58
  Solaris:     27.05.98 11:58

- The timezone is for both computers Middle European Summer Time.
  (Two hours from GMT.)

- When I connect via smbclient to the file service, I get the correct

- When I select Properties, I get the same incorrect date as shown
  by the NT-Explorer.

- When the file or directory was created / changed at a date outside
  daylight savings time, the difference is one hour, too.

- When I change the current time on the NT box to a date outside
  daylight savings time (date on the Samba server unchanged), the
  time difference grows to two hours.

What else do you need ?

> > Now, what has me completely stumped is that the dates of print jobs
> > show the correct hour, but are off by a _day_. (No, I this is not just
> > my imagination, you can come and look for yourself. :-) )
> again, you have to say _exactly_ what tools and actions you are using
> to reproduce this.

When you double click on the printer icon, you get the printers joblist
in an Explorer window, showing the name of the job and the time the
print job was submitted to the server. This time disagrees with the
time shown by the Solaris spooling system by one day:

NT:      10.08.98 13:03
Solaris: 11.08.98 13:03

(I noticed this when some print jobs got stuck in a queue. Normally
they go through the queue so fast that there is no time to look at
the date.)

> > Now, to help my understanding of the matter, is there an official
> > definition (or ar least an official guess) what NT expects as a
> > timestamp ?
> There is a spec, but what NT does with timestamps is a _long_ way from
> the spec. We have to be bug-compatible.

I feared you would say that ...

Thanks for the help.

  N. Pueschel

More information about the samba-technical mailing list