镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Accept both ICU mappings for Pacific Standard Time in Canada - #136942

Merged
tarekgh merged 2 commits into
dotnet:mainfrom
tarekgh:fix-timezone-icu-canada-mapping
Nov 4, 2026
Merged

tarekgh merged 2 commits into
dotnet:mainfrom
tarekgh:fix-timezone-icu-canada-mapping

Conversation

@tarekgh

@tarekgh tarekgh commented Nov 3, 2026

Copy link
Copy Markdown
Member

Summary

Allow IdsConversionsWithRegionTest to accept either America/Vancouver or America/Los_Angeles when converting Pacific Standard Time with region CA. The result depends on the ICU mapping data installed on the test host.

The theory now takes a params string[] of expected IANA IDs and checks that the returned ID is in that set. All other cases retain a single accepted value. No product behavior changes.

Validation

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

Passed: build completed with zero warnings and errors; all 23 theory cases passed with zero failures or skips.

git --no-pager diff --check

Passed.

Validation used this Windows host's ICU 72.1 mapping, which returns America/Vancouver. Execution with updated ICU data was not tested locally.

Resolves #136758

@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-datetime
See info in area-owners.md if you want to be subscribed.

@jeffhandley jeffhandley left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@tarekgh
tarekgh merged commit 8eeb510 into dotnet:main Nov 4, 2026
82 of 84 checks passed
@tarekgh

tarekgh commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

/backport to release/11.0

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Started backporting to release/11.0 (link to workflow run)

@tarekgh

tarekgh commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

/backport to release/10.0

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Started backporting to release/10.0 (link to workflow run)

@tarekgh

tarekgh commented Nov 4, 2026

Copy link
Copy Markdown
Member Author

/backport to release/8.0-staging

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Started backporting to release/8.0-staging (link to workflow run)

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

@tarekgh backporting to release/10.0 failed, the patch most likely resulted in conflicts. Please backport manually!

git am output
$ git cherry-pick 8eeb510884aeb2c8915651a360fe1435f5652c2f

Auto-merging src/libraries/System.Runtime/tests/System.Runtime.Tests/System/TimeZoneInfoTests.cs
CONFLICT (content): Merge conflict in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/TimeZoneInfoTests.cs
error: could not apply 8eeb510884a... Accept both ICU mappings for Pacific Standard Time in Canada (#136942)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"


$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Accept both ICU mappings for Pacific Standard Time in Canada
Using index info to reconstruct a base tree...
M	src/libraries/System.Runtime/tests/System.Runtime.Tests/System/TimeZoneInfoTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/libraries/System.Runtime/tests/System.Runtime.Tests/System/TimeZoneInfoTests.cs
CONFLICT (content): Merge conflict in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/TimeZoneInfoTests.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Accept both ICU mappings for Pacific Standard Time in Canada
Error: The process '/usr/bin/git' failed with exit code 128

Link to workflow output

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

@tarekgh backporting to release/8.0-staging failed, the patch most likely resulted in conflicts. Please backport manually!

git am output
$ git cherry-pick 8eeb510884aeb2c8915651a360fe1435f5652c2f

Auto-merging src/libraries/System.Runtime/tests/System/TimeZoneInfoTests.cs
CONFLICT (content): Merge conflict in src/libraries/System.Runtime/tests/System/TimeZoneInfoTests.cs
error: could not apply 8eeb510884a... Accept both ICU mappings for Pacific Standard Time in Canada (#136942)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"


$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Accept both ICU mappings for Pacific Standard Time in Canada
Using index info to reconstruct a base tree...
A	src/libraries/System.Runtime/tests/System.Runtime.Tests/System/TimeZoneInfoTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/libraries/System.Runtime/tests/System/TimeZoneInfoTests.cs
CONFLICT (content): Merge conflict in src/libraries/System.Runtime/tests/System/TimeZoneInfoTests.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Accept both ICU mappings for Pacific Standard Time in Canada
Error: The process '/usr/bin/git' failed with exit code 128

Link to workflow output

tarekgh added a commit that referenced this pull request Nov 5, 2026
…ard Time in Canada (#136980)

Backport of #136942 to release/11.0

/cc @tarekgh

## Customer Impact

- [ ] Customer reported
- [ ] Found internally

[Select one or both of the boxes. Describe how this issue impacts
customers, citing the expected and actual behaviors and scope of the
issue. If customer-reported, provide the issue number.]

## Regression

- [ ] Yes
- [ ] No

[If yes, specify when the regression was introduced. Provide the PR or
commit if known.]

## Testing

[How was the fix verified? How was the issue missed previously? What
tests were added?]

## Risk

[High/Medium/Low. Justify the indication by mentioning how risks were
measured and addressed.]

**IMPORTANT**: If this backport is for a servicing release, please
verify that:

- For .NET 8 and .NET 9: The PR target branch is `release/X.0-staging`,
not `release/X.0`.
- For .NET 10+: The PR target branch is `release/X.0` (no `-staging`
suffix).

## 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.

Co-authored-by: Tarek Mahmoud Sayed <10833894+tarekgh@users.noreply.github.com>
Co-authored-by: Tarek Mahmoud Sayed <tarekms@ntdev.microsoft.com>
tarekgh added a commit that referenced this pull request Nov 5, 2026
…ard Time in Canada (#136981)

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/10.0`.

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 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,
replacing only the conditional theory attribute with `[Theory]` in the
temporary harness.

From the temporary harness directory:

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

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

From the release worktree:

```powershell
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

<!-- 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.

Resolves #136758

Co-authored-by: Tarek Mahmoud Sayed <tarekms@ntdev.microsoft.com>
tarekgh added a commit that referenced this pull request Nov 5, 2026
…c Standard Time in Canada (#136982)

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/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

<!-- 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,
replacing only the conditional theory attribute with `[Theory]` in the
temporary harness.

From the temporary harness directory:

```powershell
& '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:

```powershell
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

<!-- 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 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](../../docs/project/library-servicing.md) and gotten it
explicitly reviewed.

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

Resolves #136758

Co-authored-by: Tarek Mahmoud Sayed <tarekms@ntdev.microsoft.com>
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 12.0-preview1 milestone Nov 6, 2026
@ViveliDuCh

Copy link
Copy Markdown
Member

/backport to release/9.0-staging

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Started backporting to release/9.0-staging (link to workflow run)

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

@ViveliDuCh backporting to release/9.0-staging failed, the patch most likely resulted in conflicts. Please backport manually!

git am output
$ git cherry-pick 8eeb510884aeb2c8915651a360fe1435f5652c2f

Auto-merging src/libraries/System.Runtime/tests/System.Runtime.Tests/System/TimeZoneInfoTests.cs
CONFLICT (content): Merge conflict in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/TimeZoneInfoTests.cs
error: could not apply 8eeb510884a... Accept both ICU mappings for Pacific Standard Time in Canada (#136942)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config set advice.mergeConflict false"


$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Accept both ICU mappings for Pacific Standard Time in Canada
Using index info to reconstruct a base tree...
M	src/libraries/System.Runtime/tests/System.Runtime.Tests/System/TimeZoneInfoTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/libraries/System.Runtime/tests/System.Runtime.Tests/System/TimeZoneInfoTests.cs
CONFLICT (content): Merge conflict in src/libraries/System.Runtime/tests/System.Runtime.Tests/System/TimeZoneInfoTests.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Accept both ICU mappings for Pacific Standard Time in Canada
Error: The process '/usr/bin/git' failed with exit code 128

Link to workflow output

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test failure: IdsConversionsWithRegionTest America/Vancouver America/Los_Angeles mismatch

3 participants