Hello,
I don't know if it will solve my sync problem with unison but I've noticed that the way timezone is passed to the sync containers is TZ=${TZ-`readlink /etc/localtime | sed -e 's,/usr/share/zoneinfo/,,'`} but on my MacOSX High Sierra 10.13.2 (17C205) the result of readlink /etc/localtime is /var/db/timezone/zoneinfo/Europe/Paris, so the timezone in the sync container is always wrong.
Version 17.12.0-ce-mac49 (21995)
unison
OSX Version
Thats interesting and yes this can def cause sync issues due to the time.
The question now is, how to make this more stable - could we assume that the last part of the path is always the TZ? ( no matter which path ).
Under Sierra its
readlink /etc/localtime | sed -e 's,/usr/share/zoneinfo/,,'
Europe/Berlin
well it turns out that
basename `readlink /etc/localtime`
Berlin
Will not work either, we would need Europe/Berlin here. So i guess
Zone=basename $(dirname `readlink /etc/localtime`)
City=basename `readlink /etc/localtime`
echo "$Zone/$City"
would do it. AS one lines
echo $(basename $(dirname `readlink /etc/localtime`))/$(basename `readlink /etc/localtime`)
Could you test this?
i get
echo $(basename $(dirname `readlink /etc/localtime`))/$(basename `readlink /etc/localtime`)
Europe/Berlin
I get :
echo $(basename $(dirname `readlink /etc/localtime`))/$(basename `readlink /etc/localtime`)
Europe/Paris
That seems good ! :)
Not on High Sierra yet, but for me it gets Pacific/Auckland, which is correct.
i did not manage to release it yet, quiet busy times, sorry.
finally - thanks for the patience
@EugenMayer You only changed it for rsync ? why not on native_osx
https://github.com/EugenMayer/docker-sync/blob/e403265d78025c98525e2d127f761ccebb592d77/lib/docker-sync/sync_strategy/native_osx.rb#L97
https://github.com/EugenMayer/docker-sync/blob/e403265d78025c98525e2d127f761ccebb592d77/lib/docker-sync/sync_strategy/native_osx.rb#L102
and unison
https://github.com/EugenMayer/docker-sync/blob/e403265d78025c98525e2d127f761ccebb592d77/lib/docker-sync/sync_strategy/unison.rb#L185
?
We have way to much code duplication. You right, we want to fix that for all of those
fixed with 0.5.6