dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
14.56k stars 4.54k forks source link

TimeZoneInfo_DisplayNameStartsWithOffset failures for Syria and Greenland #99727

Open filipnavara opened 3 months ago

filipnavara commented 3 months ago

I started getting local failures for this test:

  [FAIL] System.Tests.TimeZoneInfoTests.TimeZoneInfo_DisplayNameStartsWithOffset(tzi: (UTC-03:00) Greenland)
  -03:00 != -02:00:00, dn:(UTC-03:00) Greenland, sn:Greenland Standard Time
     at System.Tests.TimeZoneInfoTests.TimeZoneInfo_DisplayNameStartsWithOffset(TimeZoneInfo tzi) + 0x838
     at System.Runtime.Tests!<BaseAddress>+0x1e6d442
     at System.Runtime.RawCalliHelper.Call(IntPtr, Void*, Byte&, Byte&, Void*) + 0x29
     at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) + 0xaa
  [FAIL] System.Tests.TimeZoneInfoTests.TimeZoneInfo_DisplayNameStartsWithOffset(tzi: (UTC+02:00) Damascus)
  02:00 != 03:00:00, dn:(UTC+02:00) Damascus, sn:Syria Standard Time
     at System.Tests.TimeZoneInfoTests.TimeZoneInfo_DisplayNameStartsWithOffset(TimeZoneInfo tzi) + 0x838
     at System.Runtime.Tests!<BaseAddress>+0x1e6d442
     at System.Runtime.RawCalliHelper.Call(IntPtr, Void*, Byte&, Byte&, Void*) + 0x29
     at System.Reflection.DynamicInvokeInfo.InvokeWithFewArguments(IntPtr, Byte&, Byte&, Object[], BinderBundle, Boolean) + 0xaa

Syria changed the standard time last October. Greenland changed it on 25 March 2023.

This is on Windows 11 build 10.0.26063.1.

/cc @tarekgh

tarekgh commented 3 months ago

@filipnavara looks we need to fix the test. Are you interested to submit a PR? By the way, I didn't look deeply but I can try when I get a chance.

tarekgh commented 3 months ago

Thanks for your report by the way :-)

filipnavara commented 3 months ago

Similar case in the past has been reported to the Windows team as OS bug. Hence why I reported it in issue first to get a proper triage

I can make a PR with workaround and/or report it as OS feedback but I would prefer someone knowledgeable to chime in first whether it’s the right approach.

tarekgh commented 3 months ago

@filipnavara thanks. I'll take a look when I get a chance.

Clockwork-Muse commented 3 months ago

.... So, given that this (and similar tests) is driven by CLDR/ICU updates, should we be pulling in/using a custom, static, data set so that we don't keep running into these issues?