-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alpine docker image does not obey local timezone anymore #59636
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Seems like TZ was working as expected on .NET 5 with - FROM mcr.microsoft.com/dotnet/aspnet:5.0-alpine AS runtime
+ FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine AS runtime
RUN apk update --no-cache && apk upgrade --no-cache
- RUN apk add --no-cache tzdata
+ RUN apk add --no-cache tzdata icu-libs
ENV TZ=Europe/Berlin
ENV LANG=de_DE.UTF-8
ENV LANGUAGE=${LANG}
ENV LC_ALL=${LANG}
+ ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
WORKDIR /app
COPY --from=publish /build/Foo/out ./
ENTRYPOINT [ "dotnet", "Foo.dll" ] results in:
on both, 5.0 and 6.0. not sure if it is an intentional change or accidental breakage. |
Thanks, this works. So current behavior is correct, |
Perhaps @GrabYourPitchforks and @tarekgh can answer more accurately whether or not if it is a regression. To me the behavior of net5.0 seems correct; recognize correct TZ even in the invariant mode. |
Tagging subscribers to this area: @dotnet/area-system-runtime Issue DetailsDescriptionThe release 6.0.0-rc.1 does not obey the local timezone information. This is a regression, see the following steps to reproduce Steps to reproduce
Working
This will produce the following output
BugWhen you now take the same code, change target framework from
|
Thanks @nalla for reporting this issue. It is a regression and I am looking at it. |
This issue is addressed by the PR #59727. |
Description
The release 6.0.0-rc.1 does not obey the local timezone information. This is a regression, see the following steps to reproduce
Steps to reproduce
Working
This will produce the following output
Bug
When you now take the same code, change target framework from
net5.0
tonet6.0
and use the sameDockerfile
as a base and usemcr.microsoft.com/dotnet/sdk:6.0
andmcr.microsoft.com/dotnet/aspnet:6.0-alpine
, you will get the following outputThe text was updated successfully, but these errors were encountered: