Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #2525 from josephdecock/master
Browse files Browse the repository at this point in the history
Fixed unit tests that assume the local timezone has a negative offset
  • Loading branch information
horsdal authored Aug 1, 2016
2 parents 1b32115 + 7d0649c commit d7973f5
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ public void Should_serialize_unspecified_datetime_object()

//Then
canSerialize.ShouldBeTrue();
serializedObject.ShouldEqual(string.Format("2014-03-09T17:03:25.2340000+{0}", offset.Hours.ToString("00") + ":" + offset.Minutes.ToString("00")));
serializedObject.ShouldEqual(string.Format("2014-03-09T17:03:25.2340000{0}:{1}",
offset.Hours.ToString("+00;-00"), offset.Minutes.ToString("00")));
}

[Fact]
Expand All @@ -109,7 +110,8 @@ public void Should_serialize_local_datetime_object()

//Then
canSerialize.ShouldBeTrue();
serializedObject.ShouldEqual(string.Format("2014-03-09T17:03:25.2340000+{0}", offset.Hours.ToString("00") + ":" + offset.Minutes.ToString("00")));
serializedObject.ShouldEqual(string.Format("2014-03-09T17:03:25.2340000{0}:{1}",
offset.Hours.ToString("+00;-00"), offset.Minutes.ToString("00")));
}

[Fact]
Expand Down

0 comments on commit d7973f5

Please sign in to comment.