Changing timezone in VPS

If you would like to change the timezone on your VPS here is how you can do so through an SSH session.

The idea is to create a symlink with the target being the timezone file in /usr/share/zoneinfo and the source as /etc/localtime

Here is an example of how to set it for EST/EDT:

Code:
bash-2.05b# ln -f -s /usr/share/zoneinfo/EST5EDT /etc/localtime

To verify that it worked:

Code:
bash-2.05b# date
Mon Apr 23 18:00:05 EDT 2012

You may need to restart services on your VPS in order for them to recognize the change in timezone.

To get a full list of timezones that are available, use the following command:

Code:
bash-2.05b# find /usr/share/zoneinfo/
/usr/share/zoneinfo/
/usr/share/zoneinfo/Africa
/usr/share/zoneinfo/Africa/Abidjan
/usr/share/zoneinfo/Africa/Accra
/usr/share/zoneinfo/Africa/Addis_Ababa
/usr/share/zoneinfo/Africa/Algiers
/usr/share/zoneinfo/Africa/Asmera
/usr/share/zoneinfo/Africa/Bamako
/usr/share/zoneinfo/Africa/Bangui
/usr/share/zoneinfo/Africa/Banjul

--snip--

The output will be very long, but you can use the grep command to limit your search:

Code:
bash#  find /usr/share/zoneinfo/ | grep -i cst
/usr/share/zoneinfo/CST6CDT
/usr/share/zoneinfo/posix/CST6CDT
/usr/share/zoneinfo/right/CST6CDT
bash# find /usr/share/zoneinfo/ | grep -i turkey /usr/share/zoneinfo/posix/Turkey /usr/share/zoneinfo/right/Turkey /usr/share/zoneinfo/Turkey
  • 8 Users Found This Useful
Was this answer helpful?

Related Articles

cPanel/WHM Questions

Here are the links to the manuals for cPanel/WHM: cPanel Manual WHM Manual

Transferring Domains to CentralHosts.com

Want to point an existing domain to your CentralHosts.com VPS? Simply log into your domain...

How do I cancel my account?

All requests for service cancellation must be made either through our billing system WHMCS....

How do I connect to my VPS?

Connecting to a Windows Server In order to connect to a Windows Server you will need to utilize...

How do I install applications onto my server?

You would install applications on your server like you would on any other computer/PC. The...