Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2440

Add DateTime representation to DateTimeOffsetSerializer

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Trivial - P5 Trivial - P5
    • 2.15.0
    • 2.7.2
    • Serialization
    • None
    • Fully Compatible

    Description

      Hi all,

      I was wondering why the decision was made to not allow a BsonType.DateTime to be (de)serialized as DateTimeOffset? I know you loose the Offset, etc. but I think this is not a big deal. Converting DateTimeOffset to and from DateTimes is generally a valid operation, so why not allowing it in MongoDB C#?

      Just curios, because it could help, when someone has to handle with DateTimeOffset in models but wants to be persisted as BsonType.DateTime.

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            lukster Lukas Vosyka
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: