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 don't know if the fact that the server is an Amazon EC2 instance makes any difference, but I thought I should mention it.

I'm trying to set the time to an incorrect time for testing reasons.

The server is running Debian 5.0.2

When I try to set the time, it immediately reverts back.

# date -s "2125"
Fri May 13 21:25:00 IST 2011
# date
Fri May 13 12:37:49 IST 2011

If I run # dpkg-reconfigure tzdata (found on Debian User Forums) and change the timezone there to a different time zone, the value returned from # date is still exactly as before.

I'm a bit confused as to why there are two programs that seem to change different time values.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Try setting following variable

# echo 1 > /proc/sys/xen/independent_wallclock

share|improve this answer
    
even with sudo I get "-bash: /proc/sys/xen/independent_wallclock: Permission denied" –  Rob Jul 25 '11 at 15:04
    
I had to set it with sysctl -w xen.independent_wallclock=1 –  Rob Jul 25 '11 at 15:06

Xen sets the system clock at regular intervals, from the host/hypervisor's clock.

Another question addressed this phenomenon: Do I need to run ntpd in my EC2 instance?

share|improve this answer

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.