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.

  • 1
    Does it revert back to the current date and time if you make a small change, like setting the date to 10:10am on 10/10/19? – drivec Sep 17 '19 at 18:37
  • I tried altering it to 3 months in the future (still in the same year) and it still reverted it. – user1091162 Sep 17 '19 at 18:38
  • Have you tried running Command Prompt as an admin and trying "date 09/17/2020" ? – drivec Sep 17 '19 at 18:41
  • I tried that too (command prompt as admin) it did the same thing. Changed it for like 10 seconds, and then it reverted. I also tried changing the hour forward by just 1 hour, and it still reverted back. – user1091162 Sep 17 '19 at 19:00
  • 2
    Have you tried changing the BIOS clock? – Pylsa Sep 17 '19 at 20:00
  • This computer is a virtual machine run through virtualbox. I don't see a BIOS, or if there is one, how do I access it? – user1091162 Sep 17 '19 at 20:22
  • @user1091162 Ah, knowing that it's a VM is super helpful. Give me a moment to test things to give you an answer. This may be heavily related to https://superuser.com/questions/539880/using-virtual-box-is-it-possible-to-set-your-virtual-machine-time-to-be-differen – drivec Sep 18 '19 at 15:00

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
  • 7
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,178
  • 1
  • 14
  • 26
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,170
  • 11
  • 17
  • 24
soulflyman
  • 101
  • 2