Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libs][Unix] Fix UTC alias lookup #88641

Merged
merged 9 commits into from
Jul 13, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ private static bool IsUtcAlias (string id)
case 69: // e
case 101: // E
return string.Equals(id, "Etc/UTC", StringComparison.OrdinalIgnoreCase) ||
string.Equals(id, "Etc/UCT", StringComparison.OrdinalIgnoreCase) ||
string.Equals(id, "Etc/Universal", StringComparison.OrdinalIgnoreCase) ||
string.Equals(id, "Etc/UTC", StringComparison.OrdinalIgnoreCase) ||
string.Equals(id, "Etc/Zulu", StringComparison.OrdinalIgnoreCase);
case 85: // u
case 117: // U
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2334,6 +2334,11 @@ public static IEnumerable<object[]> SystemTimeZonesTestData()
yield return new object[] { tz };
}
}

foreach (string alias in s_UtcAliases)
{
yield return new object[] { TimeZoneInfo.FindSystemTimeZoneById(alias) };
}
}
}

Expand Down