Hey,
I got stuck trying to set the timezone. Could anybody lead me to the right direction where and how to set it up?
Thank you.
What’s your use case? Generally servers should run in UTC.
I have a small golang project running tasks periodically. The server is for my personal use only, so it doesn’t really matter to me, if changing the timezone might not be best practice. It would help me not always get confused when reading logfiles.
Honestly when you factor in the issues with DST I’d just run date -u
on your host system to get the current UTC time to reference the logs. Failing that: I have no idea how to change the timezone.
You could set the environment variable like TZ=Europe/London
For example
$ sudo docker run -i -t -e TZ=Europe/London centos /bin/bash
[root@3a778f0 /]# date
Fri Nov 27 17:10:18 GMT 2015
I’ve set the env var TZ in Rancher Server but it does not reflect in the logs which are still UTC… is this normal ?