[wellylug] Daylight Savings and Samba Timestamps
David Antliff
dave.antliff at paradise.net.nz
Tue Oct 4 09:38:37 NZDT 2005
Hello,
We have a Redhat 9.0 file server running Samba and several clients running
Windows 2000. Under normal circumstances this works fine. However with the
advent of daylight savings an interesting problem has developed:
1. the date, time, timezone and DS state on the Win2k host is correct.
2. the date, time, timezone and DS state on the Redhat server is correct.
3. when a file is copied by a win2k user from a win2k host to the redhat
server (via samba) the final date on the file (as it resides on the Redhat
filesystem) is an hour early compared to other files created locally at
the same time.
Here's an example:
'test.c' on the win2k machine has a timestamp of 09:21:21 am. Copy via
samba (drag-n-drop) onto Redhat server and Win2k reports the modified time
as 09:21:21. No problem there. However from a linux shell, 'stat test.c'
shows the timestamp as:
Modify: 2005-10-04 08:21:22.000000000 +1300
That looks reasonable I guess, only:
# ls -l test.c
-rwxrw-rw- 1 nobody users 0 Oct 4 08:21 test.c
Hmmmm - 08:21am. Fine, so the time used by Redhat is non-DaylightSavings.
Check:
# date
Tue Oct 4 09:29:58 NZDT 2005
Hmmm.
Ok, so lets try this:
# date
Tue Oct 4 09:22:03 NZDT 2005
# touch test2.c
# stat test2.c | grep Modify
Modify: 2005-10-04 09:22:12.000000000 +1300
# ls -l test2.c
-rw-r--r-- 1 dantliff users 0 Oct 4 09:22 test2.c
Right, so now I have two files in the same directory, created within
minutes of each other (albeit on different machines) with a timestamp that
varies by an hour.
Guess what this does to 'make'? :( :(
Has anyone come across this before? Is it a problem with Samba or is it
intrinsic to the problem of sharing files between Linux and Windows
systems?
Thanks,
David.
More information about the wellylug
mailing list