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

DateTime values before 1970 used in a $gt comparison produce no results

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.9
    • Affects Version/s: 0.7
    • Component/s: None
    • None
    • Environment:
      Win 7, .NET 4

      Performing a find with various DateTime values using a greater than comparison produces incorrect results for dates prior to 1970.

      ... Find(Query.GT("DateTimeFetched", cut)).Count();

      Found 0 records for 01/01/0001 00:00:00
      Found 2559 records for 01/01/1970 00:00:00
      Found 2559 records for 01/01/1980 00:00:00
      Found 2559 records for 01/01/2010 00:00:00

      Expected either throw an exception if there is no way that the passed DateTime value can be handled or (ii) preferably for it to actually work.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            ianmercer Ian Mercer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: