Bekijk de volledige versie : Samba Timestamp

02-01-2011, 22:59

I'm using a USB disk to mirror a folder of my harddisk. First, I sync with the USB disk plugged in locally (to my desktop): everything works fine, and the timestamp of both files (local and mirror) is the same. But when the USB disk is plugged to Asus Router, there is time offset of 1 hour between the local file and the USB disk file (USB disk file is +1hour). Both desktop and router are set for the same timezone ("GMT: Lisbon" aka "GMT0BST,M3.5.0/1,M10.5.0"), and the offset does not occur if I plug the USB disk back to my desktop. This issue occurs both in Oleg's ( from 2010.11.27) and Official ( firmware.

Thanks in advance for your help.

03-01-2011, 11:46
Most likely, this is problem with the Windows OS running on the client side. Samba time is accurate, Windows isn't due to daylight time changes. More details here:



Ignore time changes smaller than 1 hour in the sync utility (not suitable for critical applications)
Use a linux client with a VM or co/andLinux to sync the folders (requires extra system resources, but a lightweight Linux flavor
can be adopted)
Disable DST in Windows.

06-01-2011, 00:28

It is not only a Windows problem, but Samba's configuration problem! Whichever Timezone is set in Asus WL-500g, the timestamp of the files reported by Samba is always the same (whereas the timestamp reported by an ssh session changes according to the timezone).

While looking for a fix, I found this

Maybe samba service is invoked before TZ is set? Can someone please help?


12-01-2011, 15:16
Maybe install timezone utility? Just a guess..

-ipkg update
-ipkg install tz

-Goto the /opt/share/zoneinfo folder and find
your timezone location. Copy this location to the
folder /etc/localtime. e.g.:
cp /opt/share/zoneinfo/Europe/Amsterdam /etc/localtime

-Open '/usr/local/.files' and add this line:

-To make the change permanent, save it to flash:
flashfs save && flashfs commit && flashfs enable

-Restart Samba

14-01-2011, 11:09
Hi avberk,

Thank you for your reply. I will try that as soon as possible, for now I've been able to set up successfully a sync utility (unison) that is based on file contents rather than on timestamps. It runs sloooow due to the large amount of data ( and because I'm mounting remote folder locally instead of using a unison utility inside the router), but at least I can fully trust on the sync results. Next step is to learn how to compile and package unison, so that syncing becomes much faster.