Skip to content

Commit dda010a

Browse files
Allow two display names for Sydney time zone + disable NoBackwardTimeZones test on Android (#118455)
Co-authored-by: Matous Kozak <[email protected]>
1 parent a4d9f32 commit dda010a

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
@@ -89,7 +89,7 @@ public static void Names()
8989
// Name abbreviations, if available, are used instead
9090
public static IEnumerable<object[]> Platform_TimeZoneNamesTestData()
9191
{
92-
if (PlatformDetection.IsBrowser || (PlatformDetection.IsNotHybridGlobalizationOnApplePlatform && (PlatformDetection.IsMacCatalyst || PlatformDetection.IsiOS || PlatformDetection.IstvOS)))
92+
if (PlatformDetection.IsBrowser)
9393
return new TheoryData<TimeZoneInfo, string, string, string, string, string>
9494
{
9595
{ TimeZoneInfo.FindSystemTimeZoneById(s_strPacific), "(UTC-08:00) America/Los_Angeles", null, "PST", "PDT", null },
@@ -100,7 +100,7 @@ public static IEnumerable<object[]> Platform_TimeZoneNamesTestData()
100100
{ s_NewfoundlandTz, "(UTC-03:30) America/St_Johns", null, "NST", "NDT", null },
101101
{ s_catamarcaTz, "(UTC-03:00) America/Argentina/Catamarca", null, "-03", "-02", null }
102102
};
103-
else if (PlatformDetection.IsHybridGlobalizationOnApplePlatform && (PlatformDetection.IsMacCatalyst || PlatformDetection.IsiOS || PlatformDetection.IstvOS))
103+
else if (PlatformDetection.IsAppleMobile)
104104
return new TheoryData<TimeZoneInfo, string, string, string, string, string>
105105
{
106106
{ TimeZoneInfo.FindSystemTimeZoneById(s_strPacific), "(UTC-08:00) America/Los_Angeles", null, "Pacific Standard Time", "Pacific Daylight Time", "Pacific Summer Time" },
@@ -125,7 +125,7 @@ public static IEnumerable<object[]> Platform_TimeZoneNamesTestData()
125125
return new TheoryData<TimeZoneInfo, string, string, string, string, string>
126126
{
127127
{ TimeZoneInfo.FindSystemTimeZoneById(s_strPacific), "(UTC-08:00) Pacific Time (Los Angeles)", null, "Pacific Standard Time", "Pacific Daylight Time", "Pacific Summer Time" },
128-
{ TimeZoneInfo.FindSystemTimeZoneById(s_strSydney), "(UTC+10:00) Eastern Australia Time (Sydney)", null, "Australian Eastern Standard Time", "Australian Eastern Daylight Time", null },
128+
{ 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 },
129129
{ TimeZoneInfo.FindSystemTimeZoneById(s_strPerth), "(UTC+08:00) Australian Western Standard Time (Perth)", null, "Australian Western Standard Time", "Australian Western Daylight Time", null },
130130
{ 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" },
131131
{ s_NewfoundlandTz, "(UTC-03:30) Newfoundland Time (St. John’s)", null, "Newfoundland Standard Time", "Newfoundland Daylight Time", null },
@@ -3171,6 +3171,7 @@ public static void AdjustmentRuleBaseUtcOffsetDeltaTest()
31713171

31723172
[Fact]
31733173
[ActiveIssue("https://github.com/dotnet/runtime/issues/64111", TestPlatforms.Linux)]
3174+
[ActiveIssue("https://github.com/dotnet/runtime/issues/117731", TestPlatforms.Android)]
31743175
public static void NoBackwardTimeZones()
31753176
{
31763177
if (OperatingSystem.IsAndroid() && !OperatingSystem.IsAndroidVersionAtLeast(26))

0 commit comments

Comments
 (0)