Skip to content

Commit 3b11b69

Browse files
lbussellCopilot
andcommitted
Add tzdata-legacy to Ubuntu Resolute images
The tzdata-legacy condition in the non-chiseled Dockerfile template was hardcoded to OS_VERSION_BASE = "noble". When Resolute (26.04) was added for .NET 11, the condition didn't match, so tzdata-legacy was silently dropped. This caused TimeZoneInfo.FindSystemTimeZoneById to fail for legacy timezone IDs like 'FLE Standard Time' (Europe/Kiev). Change the condition to install tzdata-legacy on all Ubuntu versions except Jammy, matching the pattern already used in the chiseled template. Fixes #7087 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent bca8500 commit 3b11b69

5 files changed

Lines changed: 10 additions & 1 deletion

File tree

eng/dockerfile-templates/Dockerfile.linux.install-deps

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
cat("libicu", VARIABLES[cat("libicu|", OS_VERSION_BASE)]),
7070
"tzdata"
7171
],
72-
when(OS_VERSION_BASE = "noble", [ "tzdata-legacy" ], []))
72+
when(isUbuntu && OS_VERSION_BASE != "jammy", [ "tzdata-legacy" ], []))
7373
)))) ^
7474

7575
set pkgs to

src/runtime-deps/11.0/resolute/amd64/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ RUN apt-get update \
1919
libssl3t64 \
2020
libstdc++6 \
2121
tzdata \
22+
tzdata-legacy \
2223
&& rm -rf /var/lib/apt/lists/*
2324

2425
# Create a non-root user and group

src/runtime-deps/11.0/resolute/arm32v7/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ RUN apt-get update \
1919
libssl3t64 \
2020
libstdc++6 \
2121
tzdata \
22+
tzdata-legacy \
2223
&& rm -rf /var/lib/apt/lists/*
2324

2425
# Create a non-root user and group

src/runtime-deps/11.0/resolute/arm64v8/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ RUN apt-get update \
1919
libssl3t64 \
2020
libstdc++6 \
2121
tzdata \
22+
tzdata-legacy \
2223
&& rm -rf /var/lib/apt/lists/*
2324

2425
# Create a non-root user and group

tests/Microsoft.DotNet.Docker.Tests/ProductImageTests.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,12 @@ private static string GetZLibPackage(OSInfo os)
379379
"icu",
380380
"tzdata"
381381
},
382+
{ OS: var os } when os == OS.ResoluteChiseled => new[]
383+
{
384+
"libicu78",
385+
"tzdata-legacy",
386+
"tzdata"
387+
},
382388
{ OS: var os } when os == OS.NobleChiseled => new[]
383389
{
384390
"libicu74",

0 commit comments

Comments
 (0)