title: Setting TimeZone for a Windows Container
body: <p>I am trying to set the timezone of a WindowsContainer which is based on the windows nano server 2019 Build 1809.</p>
  
  <p>One of the simplest way of doing it for linux containers is to set the TimeZone environment variable as shown below:</p>
  
  <pre><code>docker run -e TZ=Asia/Kolkata ubuntu date
  </code></pre>
  
  <p>Do we have anything similar for Windows Containers. Based on general windows approach i am trying to set it in the entrypoint script using PowerShell like (as shown below) but it is also giving me an error.</p>
  
  <pre><code>Set-TimeZone -Name "India Standard Time"
  Set-TimeZone : Access is denied
  At line:1 char:1
  + Set-TimeZone -Name "India Standard Time"
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  + CategoryInfo          : FromStdErr: (:) [Set-TimeZone], Win32Exception
  + FullyQualifiedErrorId : SetTimeZoneFailed,Microsoft.PowerShell.Commands.SetTimeZoneCommand
  </code></pre>
  
  <p>Any idea on how this can be done for Windows Containers based on Windows Nanoserver 2019 Build 1809?</p>