Samba + Linux + Timezone and summer time adjustement

Jean-Marc Desperrier jean-marc.desperrier at
Thu Mar 2 14:48:40 GMT 2000

I'm encountering an anormal behavior, and I think the problem is coming
from an incorrect convertion from local time to unix time (seconds since
1970 in GMT) on a filesystem mounted with smbmount.

The problem occurs under linux on a disk mounted with smbmount from an
NT station,
Samba version is 2.0.5a, linux distribution is Red Hat 6.1 (2.2.12) , NT
is NT4pl4.

The time for the files on that disk are stored in local time, which here
is CET with summer time adjustements. (CET = UTC+1, or UTC+2 in summer

When I create a new file, the file has the same time under Linux and NT.

But when I watch some old file from august last year, linux and NT
disagree by one hour.
I made some tries with the TZ variable, and discovered that if I change
TZ to UTC, the time for the file I just created becomes one hour
earlier, but the time for the files in august becomes 2 hours earlier.

Here is a table that makes this clearer :
                      Linux  (TZ=UTC)   Linux  (TZ=CET)             NT
temp file      02/03/00 11:53     02/03/00 12:53    02/03/00 12:53
old file         27/08/99 14:59      27/08/99 16:59    27/08/99 15:59

I think what happens is the following : The date of the file is first
converted to a unix time (seconds since 1970 in GMT), and then ls -l
interprets this value for display.

But when displaying the value, ls -l takes into account the summer time,
and it was not taken into account, when converting the local time to
unix time.

What component exactly does the time convertion in this case ?
How could it be changed so that the behaviour be always the same as the
one of the kernel ?

More information about the samba-technical mailing list