Changing the timezone Print

  • 9685

If you're like us, you'll want your server's timezone to match your local time to make log management easier. Fortunately, this is easy to do! This guide works perfectly on servers running CentOS and may vary on other Linux distributions.

mv /etc/localtime /etc/localtime.bak
ln -s /usr/share/zoneinfo/Europe/London /etc/localtime

In the above example, we've taken a backup of the /etc/localtime file, and adjusted the timezone to Europe/London.

To make this change permanent, you need to edit the file /etc/sysconfig/clock and add the entry ZONE="Europe/London" and save the file. This will keep the time zone even after the server reboot.

A list of supported timezones can be found here.

Was this answer helpful?

« Back


Ethernet Servers Ltd
124 City Road
London
EC1V 2NX
United Kingdom


Registered Limited Company: #09114946

Telephone:
+44 330 043 1258

Email:
hello@ethernetservers.com

Copyright © 2014 - 2024 - Ethernet Servers Ltd - All Rights Reserved.

Proudly serving customers in 143 countries since July 2014!