In the last two months, we have got quite a few issues with the server time and date occasionally changing to some absolute random values. Sometimes it is a few days in the future or past, sometimes - even several months.
We have got the problem on several VMs, so it is not the problem with one VM unfortunately.
We run Windows Server 2019 (Version 1809 OS Build 17763.3406) on Amazon EC2.
We synced time using AWS default endpoint 169.254.169.123, and then we switched to managed AWS Active Directory. The provisioning is done with Ansible, not sure if it matters though.
All time change events are logged in the system, and look identical, like this one:
The system time has changed to 2022-12-23T01:10:04.150070300Z from >2022-09-14T12:22:57.146781800Z.
Change Reason: An application or system component changed the time.
Process: '\Device\HarddiskVolume1\Windows\System32\svchost.exe' (PID 372).
As you can see, the change is very significant and thus, affects the web applications run on IIS server on these VMs.
Do you know what can be the reason, and where we should look in order to fix the issue?
Edit: adding details according to @Greg's comment:
C:\Windows\system32>w32tm /query /status /verbose Leap Indicator: 0(no
warning) Stratum: 6 (secondary reference - syncd by (S)NTP) Precision:
-23 (119.209ns per tick) Root Delay: 0.0643878s Root Dispersion: 7.8759466s ReferenceId: 0x0A050C5D (source IP: 10.3.15.74) (edited) Last Successful Sync Time: 11/2/2022 11:05:39 PM Source:
WIN-BOLJH2K6OOL.companydomain.cloud (edited) Poll Interval: 6 (64s)
Phase Offset: -0.0023147s ClockRate: 0.0156250s State Machine: 1
(Hold) Time Source Flags: 8 (SignatureAuthenticated ) Server Role: 0
(None) Last Sync Error: 0 (The command completed successfully.) Time
since Last Good Sync Time: 8.5343114s