Ubuntu: change timezone to UTC does not affect syslog time?

I changed the time zone of my server (Ubuntu 12.04) to UTC via:

echo 'UTC' > /etc/timezone dpkg-reconfigure --frontend noninteractive tzdata 

When running date , I see that the time is now in UTC. However, in / var / log / syslog it still displays the time with the previous setup timezone, not UTC. What for? How to make it act on the whole system? Reboot?

Thanks.

+6
source share
2 answers

For the syslog daemon to set a new time zone, use the command:

 sudo service rsyslog restart 

I found the service name to reboot with:

 ls /etc/init.d/*log* 

In general, you will have to restart each process on the system that you want to see in the new time zone. If you only need one or two, for example syslog, then you can restart them individually, but you probably reboot better and get everything consistent.

+12
source

To switch to UTC, simply do sudo dpkg-reconfigure tzdata strong>, scroll down the list of Continents and select Etc; in the second list, select UTC. If you prefer GMT instead of UTC, this is slightly more than UTC on this list.

+1
source

All Articles