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

C# driver assumes the DateTime is of kind Local when it's Unspecified

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.10.2
    • Component/s: BSON
    • None

       

      // the date is of kind Unspecified
      var date = DateTime.Parse("2020-11-20"); 
      
      // the filter will render as if the date was of kind Local
      var filter = Builders<BsonDocument>.Filter.Eq(it => it.Created, date); 

       
      Seems logical to assume the date is of kind Utc in case it is not provided.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            diana.zhivkova@gmail.com Diana Zhivkova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: