Skip to content

Commit

Permalink
Fix bug with getting system time zones
Browse files Browse the repository at this point in the history
Fixes #108
  • Loading branch information
mattjohnsonpint committed Jan 13, 2022
1 parent 815c0e2 commit 5568333
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/TimeZoneConverter/TZConvert.cs
Original file line number Diff line number Diff line change
Expand Up @@ -318,16 +318,8 @@ public static bool TryWindowsToRails(string windowsTimeZoneId, string territoryC
private static Dictionary<string, TimeZoneInfo> GetSystemTimeZones()
{
IEnumerable<TimeZoneInfo> systemTimeZones;
#if NETFRAMEWORK
systemTimeZones = TimeZoneInfo.GetSystemTimeZones();
#else
#endif

#if NETSTANDARD
if (IsWindows)
systemTimeZones = TimeZoneInfo.GetSystemTimeZones();

systemTimeZones = GetSystemTimeZonesLinux();
systemTimeZones = IsWindows ? TimeZoneInfo.GetSystemTimeZones() : GetSystemTimeZonesLinux();
#else
systemTimeZones = TimeZoneInfo.GetSystemTimeZones();
#endif
Expand Down

0 comments on commit 5568333

Please sign in to comment.