Skip to content

Commit

Permalink
Update time zone resolution in unit tests for all *nix platforms not …
Browse files Browse the repository at this point in the history
…just Mono
  • Loading branch information
michaelwilner committed Sep 18, 2018
1 parent 5a9de59 commit 68ca708
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions UnitTests/SessionScheduleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,29 @@ public class SessionScheduleTests
{
#region Properties
/// <summary>
/// Windows/Mono-agnostic time zone ID
/// Windows/*nix-agnostic time zone ID
/// (because it would be too easy if they could settle on a standard list of ids, right?)
/// </summary>
public string EASTERN_STANDARD_TIME_ZONE_ID
{
get
{
if(null != System.Type.GetType("Mono.Runtime"))
if (!TimeZoneInfo.GetSystemTimeZones().Any(x => x.Id == "Eastern Standard Time"))
return "US/Eastern";
else
return "Eastern Standard Time";
}
}

/// <summary>
/// Windows/Mono-agnostic time zone ID
/// Windows/*nix-agnostic time zone ID
/// (because it would be too easy if they could settle on a standard list of ids, right?)
/// </summary>
public string PACIFIC_STANDARD_TIME_ZONE_ID
{
get
{
if (null != System.Type.GetType("Mono.Runtime"))
if (!TimeZoneInfo.GetSystemTimeZones().Any(x => x.Id == "Pacific Standard Time"))
return "US/Pacific";
else
return "Pacific Standard Time";
Expand Down
2 changes: 1 addition & 1 deletion UnitTests/UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net452;netcoreapp2.0</TargetFrameworks>
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
Expand Down

0 comments on commit 68ca708

Please sign in to comment.