Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've just tried to set the timezone on my VPS to Europe/London:

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

This was fine. However, the time is now wildly out:

$ date
Sat Feb  5 12:33:21 GMT 2011

When it is in fact 22:31.

With it being a VPS, trying to do

$ date -s 22:31

also fails.

Is this something I can fix, or do I need my host to do something?


share|improve this question

if using xen, try

echo 1 > /proc/sys/xen/independent_wallclock

and set date time again

share|improve this answer

Can you try this from the date man page?

   date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]

So, for 22:31, you'd type date 02052231.

or the full string containing century, year and seconds...

date 020522312011.00

share|improve this answer
# date 02052237 date: cannot set date: Operation not permitted. I think it's due to the server being a VPS. – Dan Feb 5 '11 at 22:38
Do you have access to an ntpdate command? Perhaps ntpdate – ewwhite Feb 5 '11 at 22:39
No ntpdate, but I suspect the result would be the same as using date. rdate certainly doesn't work (same error as above). – Dan Feb 5 '11 at 22:53


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

See this for more info. Only works on RH systems I believe.

share|improve this answer
I did this to set the timezone, and it's done that fine (at least, the time is reported as being GMT) -- but the time itself is wrong. Thanks. – Dan Feb 5 '11 at 22:43
Hmmm, how odd. Should change the time in all applications. – atx Feb 5 '11 at 22:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.