You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
localizedName_103036605() fails when the current date is around DST change (#1562)
* localizedName_103036605() fails when the current date is around DST change
We saw a test failure in this CI job: https://ci.swift.org/job/oss-swift-6.2-bootstrap-ubuntu-24_04-x86_64/318
```
[2025-10-26T00:58:39.054Z] ✘ Test localizedName_103036605() recorded an issue at TimeZoneTests.swift:74:13: Expectation failed: (tz?.localizedName(for: .generic, locale: locale) → "Central European Time (Germany)") == (expected → "Central European Time")
```
The cause of this test failure is that this `TimeZone` API uses the current time as reference, and depending on `style` it may include the time zone city to disambiguate that from the [golden zone](https://www.unicode.org/reports/tr35/tr35-dates.html#Using_Time_Zone_Names) if the current time is close to a DST transition.
Update the test to use the golden zone to opt out of this unexpected behavior since that is not what this test was meant to test.
Also while we're here, update the test to respect the `style` argument.
* Add another expectation for when observing DST
* Use a fairly stable timezone for test
The time zone offset for Vostok recently went through a change. Udpate the test to use a stable time zone for this test
0 commit comments