title: Change TimeZone in Docker (ASP.NET Core)
body: <p>I am new to docker and wish to set <code>TZ=Australia/NSW</code> to the <a href="https://hub.docker.com/_/microsoft-dotnet-aspnet" rel="nofollow noreferrer">official dotnet core docker image</a></p>
  <p>I tried adding to <code>ENV TZ=Australia/NSW</code> on line 5, but it didn't work.</p>
  <p>Please help.</p>
  <pre><code>FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
  WORKDIR /app
  EXPOSE 80
  EXPOSE 443
  ENV TZ=Australia/NSW
  FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
  
  
  WORKDIR /src
  COPY [&quot;Application.WebAPI/Application.WebAPI.csproj&quot;, &quot;Application.WebAPI/&quot;]
  RUN dotnet restore &quot;Application.WebAPI/Application.WebAPI.csproj&quot;
  COPY . .
  WORKDIR &quot;/src/Application.WebAPI&quot;
  RUN dotnet build &quot;Application.WebAPI.csproj&quot; -c Release -o /app/build
  
  FROM build AS publish
  RUN dotnet publish &quot;Application.WebAPI.csproj&quot; -c Release -o /app/publish
  
  FROM base AS final
  WORKDIR /app
  COPY --from=publish /app/publish .
  ENTRYPOINT [&quot;dotnet&quot;, &quot;Application.WebAPI.dll&quot;]
  </code></pre>