Ayende @ Rahien

Refunds available at head office

Humane dates in RavenDB

Originally posted at 4/4/2011

One of the advantages of RavenDB is that the documents format is highly human readable. Except for one thing. Can you tell me what date is represented by this value:

/Date(1224043200000+0300)/

I thought not :-)

We have recently moved toward this format instead:

2011-04-04T11:28:46.0404749+03:00

Which it both machine and human readable.

This make figuring out what something is so much easier.

Comments

Erik Juhlin
04/16/2011 12:21 PM by
Erik Juhlin

Nice! How do you configure this when using JSON.NET?

NC
04/16/2011 12:40 PM by
NC

@Erik - Theres a parameter to pass in when you serialize. IsoDateTimeConverter

I believe that is what he's using.

googles

james.newtonking.com/.../...mes-with-json-net.aspx

string isoJson = JsonConvert.SerializeObject(entry, new IsoDateTimeConverter());

Comments have been closed on this topic.