rsync & Time Zones

Matt McCutchen matt at
Sat Jul 31 00:25:24 MDT 2010

On Fri, 2010-07-30 at 15:04 -0700, Frank Jaccarino wrote:
> As I continue to understand the nuances of using rsync for our business I am
> now coming across some time zone questions I could use some guidance on.
> My test environment is on a Windows 7 box using Cygwin for rsync.  The
> production environment may or may not be a Linux box.  Just in case this
> distinction matters.....
> We are planning on using rsync to synchronize our local storage with cloud
> storage and we would like to preserve timestamps.  What I've noticed is that
> on a Windows machine, the timestamp of a file changes when the time zone
> changes.  I can SFTP the same file using different time zones configurations
> while preserving timestamps and this will affect the timestamp of the file
> on the server in the cloud.  If I use rsync (and preserve the timestamp,
> option -t), then the timestamp on the cloud server "appears" to be my
> current time zone, regardless of my Windows time zone configuration.  I say
> "appears" because I hesitate to make any assumption without having more
> information on how rsync handles time zones and timestamps.  Does anyone
> have any insight or details that I can read up on so I may understand how
> rsync handles timestamps, time zones, etc.

Rsync preserves unix times, which are absolute (or if you prefer, in
UTC); it is not aware of time zones at all.  Traditional unix
filesystems store unix times directly, but other OSes and filesystems
may perform time zone conversions in response to rsync's requests to
read and write unix times.  You can use "stat --format=%Y" to see a
file's unix time as reported by the OS/filesystem.


More information about the rsync mailing list