-Changed DefaultDateTimeFormat on IsoDateTimeConverter to not display zero milliseconds

This commit is contained in:
JamesNK
2009-04-12 01:21:27 +00:00
parent 6042bf2207
commit 3e22e30261
6 changed files with 70 additions and 15 deletions
@@ -509,12 +509,12 @@ namespace Newtonsoft.Json.Tests.Linq
string json = a.ToString(Formatting.Indented, new IsoDateTimeConverter());
Assert.AreEqual(@"[
""2009-02-15T00:00:00.0000000Z""
""2009-02-15T00:00:00Z""
]", json);
json = JsonConvert.SerializeObject(a, new IsoDateTimeConverter());
Assert.AreEqual(@"[""2009-02-15T00:00:00.0000000Z""]", json);
Assert.AreEqual(@"[""2009-02-15T00:00:00Z""]", json);
}
[Test]
@@ -527,7 +527,7 @@ namespace Newtonsoft.Json.Tests.Linq
string json = a.ToString(Formatting.None, new IsoDateTimeConverter());
Assert.AreEqual(@"[""2009-02-15T00:00:00.0000000Z""]", json);
Assert.AreEqual(@"[""2009-02-15T00:00:00Z""]", json);
}
[Test]