Skip to content

Commit e7e3cc2

Browse files
authored
Allow two display names for Sydney time zone (#118329)
+ disable NoBackwardTimeZones test on Android
1 parent 3057101 commit e7e3cc2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/libraries/System.Runtime/tests/System.Runtime.Tests/System/TimeZoneInfoTests.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static TimeZoneInfoTests()
5757
// Name abbreviations, if available, are used instead
5858
public static IEnumerable<object[]> Platform_TimeZoneNamesTestData()
5959
{
60-
if (PlatformDetection.IsBrowser || (PlatformDetection.IsNotHybridGlobalizationOnApplePlatform && (PlatformDetection.IsMacCatalyst || PlatformDetection.IsiOS || PlatformDetection.IstvOS)))
60+
if (PlatformDetection.IsBrowser)
6161
return new TheoryData<TimeZoneInfo, string, string, string, string, string>
6262
{
6363
{ TimeZoneInfo.FindSystemTimeZoneById(s_strPacific), "(UTC-08:00) America/Los_Angeles", null, "PST", "PDT", null },
@@ -68,7 +68,7 @@ public static IEnumerable<object[]> Platform_TimeZoneNamesTestData()
6868
{ s_NewfoundlandTz, "(UTC-03:30) America/St_Johns", null, "NST", "NDT", null },
6969
{ s_catamarcaTz, "(UTC-03:00) America/Argentina/Catamarca", null, "-03", "-02", null }
7070
};
71-
else if (PlatformDetection.IsHybridGlobalizationOnApplePlatform && (PlatformDetection.IsMacCatalyst || PlatformDetection.IsiOS || PlatformDetection.IstvOS))
71+
else if (PlatformDetection.IsAppleMobile)
7272
return new TheoryData<TimeZoneInfo, string, string, string, string, string>
7373
{
7474
{ TimeZoneInfo.FindSystemTimeZoneById(s_strPacific), "(UTC-08:00) America/Los_Angeles", null, "Pacific Standard Time", "Pacific Daylight Time", "Pacific Summer Time" },
@@ -93,7 +93,7 @@ public static IEnumerable<object[]> Platform_TimeZoneNamesTestData()
9393
return new TheoryData<TimeZoneInfo, string, string, string, string, string>
9494
{
9595
{ TimeZoneInfo.FindSystemTimeZoneById(s_strPacific), "(UTC-08:00) Pacific Time (Los Angeles)", null, "Pacific Standard Time", "Pacific Daylight Time", "Pacific Summer Time" },
96-
{ TimeZoneInfo.FindSystemTimeZoneById(s_strSydney), "(UTC+10:00) Eastern Australia Time (Sydney)", null, "Australian Eastern Standard Time", "Australian Eastern Daylight Time", null },
96+
{ TimeZoneInfo.FindSystemTimeZoneById(s_strSydney), "(UTC+10:00) Eastern Australia Time (Sydney)", "(UTC+10:00) Australian Eastern Time (Sydney)", "Australian Eastern Standard Time", "Australian Eastern Daylight Time", null },
9797
{ TimeZoneInfo.FindSystemTimeZoneById(s_strPerth), "(UTC+08:00) Australian Western Standard Time (Perth)", null, "Australian Western Standard Time", "Australian Western Daylight Time", null },
9898
{ TimeZoneInfo.FindSystemTimeZoneById(s_strIran), "(UTC+03:30) Iran Time", "(UTC+03:30) Iran Standard Time (Tehran)", "Iran Standard Time", "Iran Daylight Time", "Iran Summer Time" },
9999
{ s_NewfoundlandTz, "(UTC-03:30) Newfoundland Time (St. John’s)", null, "Newfoundland Standard Time", "Newfoundland Daylight Time", null },
@@ -2732,6 +2732,7 @@ public static void FijiTimeZoneTest()
27322732

27332733
[ConditionalFact]
27342734
[ActiveIssue("https://github.com/dotnet/runtime/issues/64111", TestPlatforms.Linux)]
2735+
[ActiveIssue("https://github.com/dotnet/runtime/issues/117731", TestPlatforms.Android)]
27352736
public static void NoBackwardTimeZones()
27362737
{
27372738
if (OperatingSystem.IsAndroid() && !OperatingSystem.IsAndroidVersionAtLeast(26))

0 commit comments

Comments
 (0)