How do I troubleshoot time issues with my EC2 Windows instance?
4 minute read
I want to permanently change the time settings on my Amazon Elastic Compute Cloud (Amazon EC2) Windows instance to my local time zone. I’m unable to change the time and date on my Instance. How do I troubleshoot this?
The following are common time-related issues that occur on Windows instances:
Unable to change the time using Systems Settings or the Control Panel due to the following reasons:
The Set Time Zone Automatically option is greyed out.
The You do not have permission to perform this task error displays when trying to change time settings using the Control Panel.
The time change doesn't persist after system reboots.
The Amazon Time Sync Service is behind other atomic clocks by X minutes.
It's a best practice to use Coordinated Universal Time (UTC) for your instances to avoid human error. Using UTC on your instances also facilitates synchronization across your AWS CloudWatch logs, metrics, local logs, and other services. You can use a different time zone to suit your requirements, if needed.
Unable to change the time using Systems Settings or the Control Panel
Amazon provides the Amazon Time Sync Service, which is accessible from all EC2 instances. If you can't change the time zone and time/date, use the Command Prompt window to configure Amazon Time Sync Service on your instance.
Before you begin, use the following steps to verify that the Prohibit access to Control Panel and PC settings policy is disabled in the Local Group Policy Editor:
Open the Local Group Policy Editor.
Select User Configuration, Administrative Templates, Control Panel.
Highlight Prohibit access to Control Panel and PC settings, and then select Edit policy setting.
The time change doesn't persist after system reboots
If you're running Windows Server 2008 or later, add a RealTimeIsUniversal registry key to make the new time persist after reboot.
If your instance is domain joined to an AWS Managed Microsoft AD directory, change the time settings on your instance to use the domain controller as the time source to avoid a time skew. Skewing the time breaks authentication due to Kerberos restrictions. This might cause issues logging in to the instance. To prevent this, make sure that the RealTimeIsUniversal registry key is enabled before rebooting your instance.
The Amazon Time Sync Service is behind other atomic clocks by X minutes
To resync the Amazon Time Sync Service to your instance, do the following:
1. Run the following command to reset the NTP server to point to the Amazon Time Sync Service server: