Seguindo o strace do primeiro comando ( date
):
open("/etc/localtime", O_RDONLY)
It access the timezone file pointed by /etc/localtime which is /usr/share/zoneinfo/europe/Zurich in my case. So everything fine so far.
O strace do segundo comando ( date -u
) me deu dicas de por que ele não estava funcionando corretamente:
open("/usr/share/zoneinfo/UTC0", O_RDONLY)
There wasn't such a file in the zoneinfo directory, so I had to copy UTC to UTC0 and now everything works as expected.
date; date-u
Fri Apr 26 09:52:44 CET 2016
Fri Apr 26 07:52:44 UTC 2016