The Samba-Bugzilla – Bug 10772
Bad time logging as daemon
Last modified: 2014-08-22 14:55:03 UTC
When the rsync daemon logs, it fails to determine the correct time:
2014/08/18 18:47:24  connect from localhost (::1)
2014/08/18 17:47:24  rsync to dave/in-progress/data/ from dave@localhost (::1)
When I specify use chroot = false in the rsyncd.conf, it logs the time correctly:
2014/08/18 19:21:32  connect from localhost (::1)
2014/08/18 19:21:32  rsync to dave/in-progress/data/ from dave@localhost (::1)
There's nothing more rsync can do about this. It always calls a time function prior to going into the chroot, but if your OS decides to re-check the time files after that, you'll need to either supply those files in the chroot, or live with the alternate timezone. See the rsyncd.conf manpage for how to setup a deeper dir in a chroot that doesn't allow the user to see the chrooted timezone files (e.g. "Path = /chroot/./copy-dir" allows you to create /chroot/etc that the user can't get to) and/or the exclude option (in the config file).
Perhaps rsync should instead of calling a time function, first determine the offset from UTC that local time is, and then whenever a timestamp is printed first apply that delta and ignore timezones altogether after that.
Of course you lose the capability of showing the timezone (apart from [-+]HHMM) but that's not done anyway AFAIK.