Knowledgebase VPS Hosting and Dedicated Servers

21Jun/160

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"

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

No trackbacks yet.