• Home
  • Blog

Archieven

  • mei 2025
  • april 2025
  • oktober 2024
  • september 2024
  • september 2023
  • maart 2022
  • maart 2021
  • september 2020
  • september 2019
  • februari 2019
  • september 2018
  • september 2016
  • september 2015
Davici
  • Home
  • Blog

How to set timezone in a Docker Windows Container

When running Docker containers on Windows, ensuring the correct timezone is set is essential for maintaining accurate logs, timestamps, and scheduled tasks. By default, Docker Windows containers use UTC, which may lead to issues with time-sensitive applications. This guide outlines how to configure the timezone in a Docker Windows container.

Set Timezone via Dockerfile

The most reliable method for configuring the timezone is by specifying it in the Dockerfile. This ensures that the timezone is set when the image is built:

FROM mcr.microsoft.com/windows/servercore:ltsc2022

# Set timezone to "W. Europe Standard Time" (example)
RUN tzutil /s "W. Europe Standard Time"

# Optional: Verify timezone
RUN tzutil /g

To find the appropriate timezone for your region, run tzutil /l on the host system.

Verifying Timezone Configuration

After setting the timezone, confirm that it has been applied correctly:

Get-TimeZone
Get-Date

This will display the current timezone and the system date and time.

Tags

.NET Azure C# CTO Database DevOps Docker EDI Git HA IT developement director Microservices PostgreSQL SFTP Softwareontwikkeling Visual Studio Windows

Recent Posts

  • SFTP Server with SSH, Chroot, and authorized_keys

  • Technical Debt: een strategische aanpak voor duurzame softwareontwikkeling

  • How to install fonts in a Docker Windows Container

  • Why WebView2 Applications Face Issues in the Program Files Folder (And How to Fix Them)

  • ClickOnce signing from Azure DevOps via Azure Key Vault

Tags: Docker,Microservices

Contact

Breda, Noord-Brabant, Nederland
info@davici.nl
K.v.K. 20099979
Twitter
LinkedIn

OVERIGE

  • Algemene Voorwaarden
  • Privacybeleid
  • Cookiebeleid

Copyright © 2025 — Davici. Alle rechten voorbehouden.

Designed by WPZOOM

Beheer toestemming
Om de beste ervaringen te bieden, gebruiken wij technologieën zoals cookies om informatie over je apparaat op te slaan en/of te raadplegen. Door in te stemmen met deze technologieën kunnen wij gegevens zoals surfgedrag of unieke ID's op deze site verwerken. Als je geen toestemming geeft of uw toestemming intrekt, kan dit een nadelige invloed hebben op bepaalde functies en mogelijkheden.
Functioneel Altijd actief
De technische opslag of toegang is strikt noodzakelijk voor het legitieme doel het gebruik mogelijk te maken van een specifieke dienst waarom de abonnee of gebruiker uitdrukkelijk heeft gevraagd, of met als enig doel de uitvoering van de transmissie van een communicatie over een elektronisch communicatienetwerk.
Voorkeuren
De technische opslag of toegang is noodzakelijk voor het legitieme doel voorkeuren op te slaan die niet door de abonnee of gebruiker zijn aangevraagd.
Statistieken
De technische opslag of toegang die uitsluitend voor statistische doeleinden wordt gebruikt. De technische opslag of toegang die uitsluitend wordt gebruikt voor anonieme statistische doeleinden. Zonder dagvaarding, vrijwillige naleving door je Internet Service Provider, of aanvullende gegevens van een derde partij, kan informatie die alleen voor dit doel wordt opgeslagen of opgehaald gewoonlijk niet worden gebruikt om je te identificeren.
Marketing
De technische opslag of toegang is nodig om gebruikersprofielen op te stellen voor het verzenden van reclame, of om de gebruiker op een site of over verschillende sites te volgen voor soortgelijke marketingdoeleinden.
Beheer opties Beheer diensten Beheer {vendor_count} leveranciers Lees meer over deze doeleinden
Bekijk voorkeuren
{title} {title} {title}