Bug 2587 - Samba does not handle daylight savings time correctly
Samba does not handle daylight savings time correctly
Status: RESOLVED FIXED
Product: Samba 3.0
Classification: Unclassified
Component: File Services
3.0.9
x86 Linux
: P3 normal
: none
Assigned To: Samba Bugzilla Account
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-09 05:37 UTC by Xuân Baldauf
Modified: 2013-07-17 19:08 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xuân Baldauf 2005-04-09 05:37:44 UTC
Hello,

currently, we have daylight savings time. If a filedate is in a season where
there is no daylight savings time, the file date is reported "the wrong way" by
the samba server.

Here is the test case:

We are creating two files, whose date should be midnight exactly. Then we are
looking at the files' modification times, once using the local filesystem and
once using the samba-loopback-mounted filesystem. The problem occurs both when
using "cifs" or "smbfs" as loopback-filesystem. Interception using "ethereal"
indicates that the problem is created at the server side, not at the client side.


router|14:21:08|~> mount //localhost/hd /mnt/test2
[...]
router|14:22:17|/tmp> touch -t 200504010000 test.summer
router|14:22:18|/tmp> touch -t 200502010000 test.winter 
router|14:22:23|/tmp> stat test.summer
  File: `test.summer'
  Size: 0               Blocks: 0          IO Block: 131072 regular empty file
Device: 343h/835d       Inode: 41080       Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2005-04-01 00:00:00.000000000 +0200
Modify: 2005-04-01 00:00:00.000000000 +0200
Change: 2005-04-09 14:22:18.000000000 +0200
router|14:22:30|/tmp> stat test.winter
  File: `test.winter'
  Size: 0               Blocks: 0          IO Block: 131072 regular empty file
Device: 343h/835d       Inode: 41081       Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2005-02-01 00:00:00.000000000 +0100
Modify: 2005-02-01 00:00:00.000000000 +0100
Change: 2005-04-09 14:22:23.000000000 +0200
router|14:22:38|/tmp> stat /mnt/test2/tmp/test.summer
  File: `/mnt/test2/tmp/test.summer'
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: fh/15d  Inode: 246206      Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2005-04-01 00:00:00.000000000 +0200
Modify: 2005-04-01 00:00:00.000000000 +0200
Change: 2005-04-09 14:22:18.000000000 +0200
router|14:22:52|/tmp> stat /mnt/test2/tmp/test.winter
  File: `/mnt/test2/tmp/test.winter'
  Size: 0               Blocks: 0          IO Block: 4096   regular empty file
Device: fh/15d  Inode: 246207      Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2005-01-31 23:00:00.000000000 +0100
Modify: 2005-01-31 23:00:00.000000000 +0100
Change: 2005-04-09 14:22:23.000000000 +0200
router|14:23:27|/tmp> smbd --version
Version 3.0.10-0.1-SUSE
router|14:23:29|/tmp>


Note that "Modify: 2005-01-31 23:00:00.000000000 +0100" is wrong, the expected
output is "Modify: 2005-02-01 00:00:00.000000000 +0100" as above.

Due to this bug, creating accurate backups using Samba is not possible. Simply
changing the "time offset" parameter does not help either, because then, all
"summer times" would be wrong.
Comment 1 Björn Jacke 2013-07-17 19:08:45 UTC
this is fixed since a long time. "time offset" doesn't exist any more. Samba uses UTC only like Windows. Timezones are a client only display thing now.