danielwertheim

danielwertheim


notes from a passionate developer

Sections


Tags


Disclaimer

This is a personal blog. The opinions expressed here represent my own and not those of my employer, nor current or previous. All content is published "as is", without warranty of any kind and I don't take any responsibility and can't be liable for any claims, damages or other liabilities that might be caused by the content.

MongoDB

MongoDB, C# and DateTime's

Storing DateTime in MongoDB using C# is easy. Just add a property of DateTime and off you go. Easy. Right? Well, MongoDB stores all date times as UTC, but you can tell the driver to deserialize back as e.g DateTimeKind.Local, but nevertheless, it will be stored in UTC (and maybe not returned with th…

Daniel Wertheim Daniel Wertheim