Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-1339

Descriptive error when JSON $date lacks timezone

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 1.6.0
    • Affects Version/s: None
    • Component/s: json, libbson

      The Mongo extended JSON documentation states that $date has a "mandatory time zone field." libbson follows this and does not allow dates without time zones such as "1970-01-01T00:00:00.000"

      Return a better error message than "Could not parse "1970-01-01T00:00:00.000" as a date"? Maybe "Could not parse "1970-01-01T00:00:00.000" missing time zone".

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: