How to temporarily stop time syncing with domain controller?

I wish to do some testing on my local machine which requires me to put the date forward a year. So I can test some stuff in SQL Server (i've found it not possible to override the sql server time).

However because I'm connected to a domain, I believe this is causing the time to be reset to normal a few moments after I try to override it.

I understand that it's probably important for the local and domain time to be insync, but is it possible to temporarily block the clock from being reset?

Disconnecting from the network isn't an option, as I require an internet connection.

If there is a manual way to block the time reset what are the likely reprocutions? I don't want to screw anything up on the network :-)


Open the registry editor (regedit), navigate to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters

Find the REG_SZ value named Type. Edit the value to NoSync. Set it back to Nt5DS when you need to sync with the domain hierarchy again.

You can do this from the command line by calling

reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Parameters /v Type /d NoSync /f

or in PowerShell, with:

Set-ItemProperty HKLM:\SYSTEM\CurrentControlSet\services\W32Time\Parameters -Name "Type" -Value "NoSync"

Disable the Windows Time service or block the outbound port 123 on your local firewall.