I have had some success in getting support for using NodaTime with RavenDB.
- You can use NodaTime objects (Instant, LocalDateTime, etc...) in your classes
- They will be serialized into formats that work within RavenDB.
- Currently, this is client-side only. The RavenDB server doesn't know anything about it. (this may change)
- It requires NodaTime 1.1.0 and RavenDB 2.5.current
- There are some nuances with how to use the ZonedDateTime object in an index and query. See the comments in unit tests for details.
This is all in code in the NodaTime branch of RavenDB.Contrib
After RavenDB 2.5 goes stable, I'll merge it with the master and publish a Nuget package.
I would appreciate any and all feedback from the community.
If you're not familiar with NodaTime - now would be a great time to take a look. It is very stable, and very useful. It makes much more sense than the .Net standard DateTime class, and prevents you from making costly errors. It also implements standard IANA/Olson time zones, instead of the proprietary ones Microsoft publishes.
NodaTime home page:
Some good reading:
Thanks,
Matt