I recently discovered an old VPS I had forgotten about and began setting it up. However, I noticed that the VPS was still using the default timezone, EDT. This wouldn’t do (as I am not in the States) so I decided to fix it.

First, look at the list of possible timezones in /usr/share/zoneinfo/. I’m going to be using ‘Europe/London’ for this example.

First, move /etc/localtime out of the way:

mv /etc/localtime /etc/localtime.old

Next, create a symlink to the target timezone file:

ln -s /usr/share/zoneinfo/Europe/London /etc/localtime

To check, run date:

$ date
Sat Nov 19 10:03:40 GMT 2011

That’s it, all done :)