Skip to content

[release/8.0-staging] [Test Only] Accept both ICU mappings for Pacific Standard Time in Canada - #136982

Merged
tarekgh merged 1 commit into
dotnet:release/8.0-stagingfrom
tarekgh:fix-timezone-icu-canada-release8
Nov 5, 2026
Merged

tarekgh merged 1 commit into
dotnet:release/8.0-stagingfrom
tarekgh:fix-timezone-icu-canada-release8

Conversation

@tarekgh

@tarekgh tarekgh commented Nov 4, 2026

Copy link
Copy Markdown
Member

Fixes Issue #136758

main PR #136942

Description

Manual backport of #136942 to release/8.0-staging.

Allow IdsConversionsWithRegionTest to accept either America/Vancouver or America/Los_Angeles for Pacific Standard Time with region CA, depending on the ICU mapping data installed on the test host. The theory accepts a params string[] of expected IDs and uses Assert.Contains. All other 22 cases retain a single accepted value.

The port uses the .NET 8 test-file location and preserves the branch's existing [ConditionalTheory(nameof(SupportIanaNamesConversion))] attribute. There are no product or public API changes.

Customer Impact

Without this change, the test fails on hosts with updated ICU mappings, producing unrelated CI failures and potentially blocking servicing validation. This is a test-only fix, not a change to the conversion result applications receive.

Regression

No product regression. The test's hardcoded expected mapping does not account for newer external ICU data.

Testing

Compiled the exact modified theory method and all 23 InlineData rows extracted from this branch in a temporary standalone xUnit project, replacing only the conditional theory attribute with [Theory] in the temporary harness.

From the temporary harness directory:

& 'C:\Program Files\dotnet\dotnet.exe' test BackportTheoryValidation.csproj --framework net8.0 -p:TheoryFile=net8-theory.cs --logger 'trx;LogFileName=net8.trx'

Passed on Windows with .NET 8.0.33: 23 passed, zero failed, zero skipped.

From the release worktree:

git diff --check

Passed. The extracted method and data also match the merged main fix exactly.

Full release-branch builds and repository test-project execution were not run. Local execution used the host's older ICU mapping, which returns America/Vancouver; execution with updated ICU data was not tested locally.

Risk

Low. Only one existing test is changed. The condition controlling when it runs is unchanged, and only the Canadian Pacific mapping gains an additional accepted result. No shipping code, package contents, or public contracts change.

Package authoring signed off?

IMPORTANT: If this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.

Not applicable: test-only change; no shipping package code is modified.

Resolves #136758

Backport dotnet#136942 to release/8.0-staging, using the .NET 8 test-file location and existing conditional theory attribute.
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/area-system-globalization
See info in area-owners.md if you want to be subscribed.

@tarekgh tarekgh added this to the 8.0.x milestone Nov 4, 2026
@tarekgh tarekgh added the Servicing-consider Issue for next servicing release review label Nov 4, 2026
@tarekgh

tarekgh commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

/ba-g the failures are unrelated and the test changed in this PR is passing.

@tarekgh tarekgh added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Nov 5, 2026
@tarekgh
tarekgh merged commit c7de310 into dotnet:release/8.0-staging Nov 5, 2026
123 of 134 checks passed
ViveliDuCh added a commit that referenced this pull request Nov 9, 2026
…c Standard Time in Canada (#137106)

Fixes Issue #136758 <!-- Issue Number -->

main PR #136942 <!-- Link to PR if any that fixed this in
the main branch. -->

# Description

<!-- Give a brief summary of the issue and how the pull request is
fixing it. -->

Manual backport of #136942 to `release/9.0-staging`,
following the .NET 8 backport in #136982.

Allow `IdsConversionsWithRegionTest` to accept either
`America/Vancouver` or `America/Los_Angeles` for `Pacific Standard Time`
with region `CA`, depending on the ICU mapping data installed on the
test host. The theory accepts a `params string[]` of expected IDs and
uses `Assert.Contains`. All other 22 cases retain a single accepted
value.

The port uses the .NET 9 test-file location and preserves the branch's
existing `[ConditionalTheory(nameof(SupportIanaNamesConversion))]`
attribute. There are no product or public API changes.

# Customer Impact

<!-- What is the impact to customers of not taking this fix? -->

Without this change, the test fails on hosts with updated ICU mappings,
producing unrelated CI failures and potentially blocking servicing
validation. This is a test-only fix, not a change to the conversion
result applications receive.

# Regression

<!-- Is this fixing a problem that was introduced in the most recent
release, ie., fixing a regression? -->

No product regression. The test's hardcoded expected mapping does not
account for newer external ICU data.

# Testing

<!-- What kind of testing has been done with the fix. -->

Compiled the exact modified theory method and all 23 `InlineData` rows
extracted from this branch in a temporary standalone xUnit project
targeting .NET 9, replacing only the conditional theory attribute with
`[Theory]` in the temporary harness. Verified that the extracted method
and all data rows match the merged main fix exactly.

From the temporary harness directory:

```powershell
dotnet test BackportTheoryValidation.csproj --framework net9.0 --logger 'trx;LogFileName=net9.trx'
```

Passed on Windows with .NET 9: 23 passed, zero failed, zero skipped.

From the release worktree:

```powershell
dotnet build src\libraries\System.Runtime\tests\System.Runtime.Tests\System.Runtime.Tests.csproj /t:Test /p:XunitMethodName=System.Tests.TimeZoneInfoTests.IdsConversionsWithRegionTest
```

Blocked before test execution: build failed in
`eng\targetingpacks.targets` because the local shared framework has not
been built ("The shared framework must be built before the local
targeting pack can be consumed."). Full release-branch prerequisite
builds were not run.

```powershell
git --no-pager diff --check
```

Passed.

Execution with updated ICU data was not tested locally.

# Risk

<!-- Please assess the risk of taking this fix. Provide details backing
up your assessment. -->

Low. Only one existing test is changed. The condition controlling when
it runs is unchanged, and only the Canadian Pacific mapping gains an
additional accepted result. No shipping code, package contents, or
public contracts change.

# Package authoring no longer needed in .NET 9

IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet
package's csproj to enable building and bump the version.
Keep in mind that we still need package authoring in .NET 8 and older
versions.

Not applicable: test-only change; no shipping package code is modified.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants