-Updated to NuGet 1.7

-Fixed JsonWriters not using DateTimeZoneHandling
This commit is contained in:
James Newton-King
2012-04-17 19:41:36 +12:00
parent fa3debccad
commit 6725edb75c
11 changed files with 87 additions and 4 deletions
@@ -751,5 +751,18 @@ now brown cow?", '"', true);
Assert.AreEqual("Existing,Appended", p.Name);
}
#endif
[Test]
public void SerializeObjectDateTimeZoneHandling()
{
string json = JsonConvert.SerializeObject(
new DateTime(2000, 1, 1, 1, 1, 1, DateTimeKind.Unspecified),
new JsonSerializerSettings
{
DateTimeZoneHandling = DateTimeZoneHandling.Utc
});
Assert.AreEqual(@"""2000-01-01T01:01:01Z""", json);
}
}
}