Windows to IANA time zone conversion: remove unsupported TIME_ZONE_ID_DAYLIGHT conversion

This commit is contained in:
Hugo Melder 2022-08-07 10:55:20 +02:00
parent 8e0dc2ace6
commit 3c095da62f
2 changed files with 7 additions and 5 deletions

View file

@ -1452,10 +1452,12 @@ static NSMapTable *absolutes = 0;
#endif
localZoneSource = @"function: 'GetTimeZoneInformation()'";
if (dst == TIME_ZONE_ID_DAYLIGHT)
tzName = tz.DaylightName;
else
tzName = tz.StandardName;
// Only tz.StandardName time zone conversions are supported, as
// the Zone-Tzid table lacks all daylight time conversions:
// e.g. 'W. Europe Daylight Time' <-> 'Europe/Berlin' is not listed.
//
// See: https://unicode-org.github.io/cldr-staging/charts/latest/supplemental/zone_tzid.html
tzName = tz.StandardName;
#if defined(_MSC_VER) && defined(UCAL_H)
// Convert Windows timezone name to IANA identifier

View file

@ -65,7 +65,7 @@ int main()
testHopeful = YES;
PASS_EQUAL(
[current localizedName: NSTimeZoneNameStyleStandard locale: locale],
@"Brasilia Time",
@"Brasilia Standard Time",
"Correctly localizes standard time zone name")
/* The next few depend on ICU issues