Yesterday I wanted to change the system time in one of our test servers. Server was a Xen VM running redhat linux. I used date --set="20 Dec 2012 00:30:00" command, but when I checked the date again it showed the previous date not the date I've set using date command.
After doing some searching I found out that by default VM clock is synchronized with its host Xen Server; so changing date is not possible. We need to disable this time synchronization before updating date in the VM. To do that I had to execute following command in VM linux console.
/sbin/sysctl -e xen.independent_wallclock=1
After that I was able to change the system time using date command.