4

I want to be able to change the date and time on my vm to dates in the past. Every time I change it, it automatically changes back because of this setting. Unfortunately I cannot change it because it is disabled. I am logged in as an admin on the vm. Any ideas?

enter image description here

philt5252
  • 141
  • 3
  • Why do you need to do this? – EEAA Dec 24 '15 at 22:57
  • 1
    we have a testing application that was hardcoded to work off system time. In order to do some quick tests it would be nice to change the system time to have it produce data that was created in the past or future. I understand this isn't the best way to to it and I've contacted our third party developers about a fix to have it read from a service that provides the system time or mocked time, but until that happens this is what we need to do. – philt5252 Dec 28 '15 at 19:44

2 Answers2

3

I haven`t played around with that, but I guess you need to disable automatic synchronization first. So, the config that worked in one of the environments is:

  • Hyper-V Time Synchronization Service, startup set to "Manual"
  • Windows Time Service, startup set to "Manual"
  • Time settings set to actively synchronize with "time.windows.com" (I care about the date being different, not the time)

After you change that, IMHO you should get things to work. If not - that should be at least one step forward to your goal

  • Thanks for the info. Unfortunately it didn't work. I've confirmed that Hyper-V Time Sync and windows time service are not running after a restart. As far as the time settings are concerned I couldn't find where the sync with "time.windows.com" was being set. I dont think it's there. – philt5252 Dec 28 '15 at 17:04
  • You could have pointed out that this answer is ripped straight from here: http://serverfault.com/questions/576252/how-to-stop-time-synchronization-on-an-azure-vm?rq=1 – BlueCompute Jan 21 '16 at 12:38
  • Yup, sorry about that. Was writing in a rush, you know. – Anatoly Vilchinsky Jan 21 '16 at 12:52
1

Switching off Hyper-V Time Synchronization Service is good enough.

yup
  • 11
  • 1