Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

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

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.

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

 
discard

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.