I found that when attempting to change the Date/Time settings on a Hyper-V virtualised Windows 8 OS, I found that the date would immediately change back to the correct date.
How can I prevent the Date/Time from reverting once I've set it?
Open the 'Hyper-V Manager' application on the host machine.
On the list of 'Virtual Machines', right-click on the VM where you want to change the Date/Time settings and click 'Settings'.
Under the 'Management' section of options, select 'Integration Services', and uncheck the 'Time synchronization' option.
When changing the Date/Time settings from within the VM, the Date/Time will no longer revert to the Date/Time on your host machine.
I found Virtualbox the most easy: https://tothecore.sk/2021/04/08/disable-time-sync-for-virtualbox-virtual-machines/
How to prevent time from Host:
Close running VM run cmd as admin. C:\Program Files\Oracle\VirtualBox>VBOXManage.exe list vms C:\Program Files\Oracle\VirtualBox>VBoxManage.exe setextradata "Win7x64_" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1 I normally do this:
If you have multiple VMs then: C:\Program Files\Oracle\VirtualBox>VBOXManage.exe list vms C:\Program Files\Oracle\VirtualBox>VBoxManage.exe setextradata "042feed8-3612-4aa0-b840-727b39771ed5" "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" 1
It is possible to temporarily disable time synchronization for hyper-v vm's however every hour or so the OS will sync with the hardware clock aka the bios time. As far as i known its not possible to change the bios time for hyper-v vm's. if you disable the windows time service, the hyper-v time service and task scheduler time synchronization jobs, the OS will sync the system time to the bios clock roughly every hour.
I ended up just creating a virtualbox vm and using the bios time offset command https://winaero.com/blog/how-to-set-the-bios-date-in-virtualbox/
hopefully this feature will be implemented in the future for hyper-v.
Disable-VMIntegrationService –Name <Service Name> -VMName <Target Guest VM Name>