Skip to content

Instantly share code, notes, and snippets.

@hughbiquitous
hughbiquitous / BsonExtensions.cs
Created April 2, 2018 14:04
BsonDocument.Parse does not interpret ISO8601 date/time strings as ISODate values; these post-processing methods tidy that up after the fact.
using System;
using System.Globalization;
using MongoDB.Bson;
namespace CSharp2233
{
public static class BsonExtensions
{
private static readonly string[] _formats =
{