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.

link|improve this question
feedback

2 Answers

up vote 2 down vote accepted

Try setting following variable

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

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

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?

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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