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?

Thanks.

link|improve this question
feedback

3 Answers

if using xen, try

echo 1 > /proc/sys/xen/independent_wallclock

and set date time again

link|improve this answer
feedback

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

link|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 time.apple.com – 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
feedback

Use:

/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.

link|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. – malfy Feb 5 '11 at 22:48
feedback

Your Answer

 
or
required, but never shown

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