Setting TimeZone for a Windows Container

There is no way to properly set globalization settings like Time Zone, Language, or Windows-Location on Windows Server Core containers.

  • tzutil throws lack of privileges error
  • registry settings are ignored when container starts

It seems like you have to ensure the correct Time Zone on container host. That's doesn't make much sense, AFAIK, the whole thing about containers is ship it as image once and run it everywhere, with environment isolation and integrity.. right?!

Anyway you can see more detail on that issue on github.

Also, I've open this suggestion on Windows Server uservoice, to change that behavior.

Also, I've open this feature suggestion for improving Azure AKS host configuration for Time Zone.


Did you try to use the tzutil command?

  • Method 1:

    Following an example to use the command and set an Australian time zone:

    tzutil /s "AUS Eastern Standard Time"
    
  • Method 2:

    The registry entry HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation has all the information relating to timezone.

    From a virtual or physical machine with the correct time zone, you can export the registry values and import to the container.