Being based in Perth (GMT +8), I have always thought it made sense to have our servers running in the Australia/Perth timezone (rather than UTC).
This makes sense for many reasons, mostly that when we set up a cron job, we can use local time (rather than UTC), which makes life very easy.
Recently our Rackspace Cloud servers and Amazon EC2 instances (both running CentOS) were rebooted after updating the
glibc package, which caused each server’s timezone to revert back to UTC.
To set the timezone, I had always created a
/etc/localtime symbolic link pointing to
/usr/share/zoneinfo/Australia/Perth, however it turns out that there is one other thing that has to be done in order to make the timezone setting be persistent across updates and reboots.
Luckily, the solution was hidden away in the AWS user guide.
In addition to the symlink, it is also necessary to edit the
/etc/sysconfig/clock file, and change it to your local timezone ( in my case
After making both of these changes, be sure to reboot your server, and then use the
date command to check that your server is still in your local timezone (rather than UTC).
2 replies on “Is your Linux Timezone Reverting to UTC After Rebooting?”
Is your #linux timezone reverting to UTC after rebooting? Here’s how to make the timezone persistent across reboots: http://t.co/9E0CScUr1v
Did updating glibc to avoid the #ghost vulnerability cause your #linux server to revert to UTC? Here’s how to fix it: http://t.co/hisHi6hhzt