Portal Home > Knowledgebase > VPS Hosting and Dedicated Servers > How to change the VPS server date and time

How to change the VPS server date and time

Changing the VPS server time and date is not hard at all. The easiest way to do this is to login as root via SSH and issue the following commands:

mv /etc/localtime /etc/localtime.old

ln -sf /usr/share/zoneinfo/Greenwich /etc/localtime

If you like another time zone for the VPS hosting server you have just list the available zone files under /usr/share/zoneinfo:

ls -la /usr/share/zoneinfo

If you have a XEN VPS server you can setup the date like a regular dedicated server with:

date --set="2 OCT 2011 18:00:00"

and the time same Linux server way:

date +%T -s "11:12:12"

Where numbers are,

11: Hour (hh)
12: Minute (mm)
12: Second (ss)

Use %p locale’s equivalent of either AM or PM:

date +%T%p -s "7:20:30AM"

date +%T%p -s "13:20:30PM"

Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Buy VPS with Bitcoin (Views: 6062)
Buy VPS with Ukash (Views: 6337)

* Minimum sign up periods for cPanel Web Hosting plans: Mini - 3mo., Pro - 1mo., Biz - 1mo., cPanel Reseller Hosting, Linux VPS, Windows VPS, Managed cPanel VPS and Dedicated Servers - 1mo. secret link
Accepted payments: Credit/Debit Card, Paypal, Payza, Skrill, WebMoney, CashU, Ukash, paysafecard, Bitcoin, Perfect Money, SolidTrust Pay, OKPay, EgoPay, Western Union/MG, Wire Transfer and more.