Skip to content

Commit

Permalink
[libs][perf] Order system time zones by id
Browse files Browse the repository at this point in the history
  • Loading branch information
mdh1418 committed Jul 4, 2023
1 parent 0e95c88 commit 580a765
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ public static ReadOnlyCollection<TimeZoneInfo> GetSystemTimeZones()
{
// sort by BaseUtcOffset first and by DisplayName second - this is similar to the Windows Date/Time control panel
int comparison = x.BaseUtcOffset.CompareTo(y.BaseUtcOffset);
return comparison == 0 ? string.CompareOrdinal(x.DisplayName, y.DisplayName) : comparison;
return comparison == 0 ? string.CompareOrdinal(x.Id, y.Id) : comparison;
});

cachedData._readOnlySystemTimeZones = new ReadOnlyCollection<TimeZoneInfo>(array);
Expand Down

0 comments on commit 580a765

Please sign in to comment.