4

I'm trying to post-date my Windows 10 system by one year. I go into the Windows menu to change date and time. I press 'Change', it opens a window, I choose 2020, I press 'Change', then the clock changes to 2020 – and then it reverts to 2019 less than 30 seconds later. The system has no internet or network access, and all visible options in the window are disabled.

  • “Set time automatically” is OFF
  • “Set time zone automatically” is OFF
  • “Adjust for daylight savings time” is OFF

How can I post-date my system clock by 1 year?  Is some other piece of software altering my clock maybe, or have I encountered a flaw in Windows?

This Windows 10 system is running as a virtual machine in VirtualBox.

3 Answers3

4

Since you are using a VM with VirtualBox, your VM will automatically sync with the host computer. You will need to disable this time sync feature as written in the VirtualBox manual.

You can disable time sync by doing the following.

  1. Find your VM's .vbox file on your host machine. (You can do this by right clicking the VM in the main VirtualBox window and selecting "Show in Explorer" or "Show in Finder".)
  2. Shutdown your VM and confirm VirtualBox is no longer running.
  3. Make a backup copy of this .vbox file.
  4. Open the original .vbox file in a text editor.
  5. Under the <ExtraData> tag put the following line: <ExtraDataItem name="VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" value="1"/>
  6. Save the text file and close the text editor.
  7. Start VirtualBox and your VM.

You should now be able to change your VM's date and time independently of your VM host machine. If you ever want to sync time with your host machine again, remove the line or set the value of this line to value="0"

drivec
  • 145
0

There are at least two ways to do this...


In the VirtualBox manual, section "Disabling the Guest Additions Time Synchronization" it says:

Once installed and started, the Oracle VM VirtualBox Guest Additions will try to synchronize the guest time with the host time. This can be prevented by forbidding the guest service from reading the host clock:

$ VBoxManage setextradata VM-name "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1

I assume that using a value of 0 would re-enable the feature.

I'm not sure if you have to restart your VM with this method.


Since the way this works is the VM is syncing its time to the host, the other solution is just to change the date/time on the host. (Assuming you have admin rights to do so). The advantage is that you won't have to alter your VM settings, its quick & easy, etc. I just tried this and the new time reflected in the VM almost instantly.


Note just FYI that there are a lot of other time-related functions in https://www.virtualbox.org/manual/ch09.html#fine-tune-timers

StayOnTarget
  • 1,494
0

Just for the completeness: if you come from Google like me, but you are running a Windows VM in Hyper-V. You have to disable the Time synchronization Service in the Settings of the Virtual Machine.

Right click the VM → Settings → Integrated Services → Time synchronization

zx485
  • 2,337