JSON date parsing fails with timezones other than Z

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.12.3
    • Component/s: JSON
    • None
    • Environment:
      Windows
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      When the parser encounters a field with e.g.

      { "$date" : "2013-12-03T10:41:22.393+0200" }

      the resulting value is null.

      The reason is that the format string given to SimpleDateFormat is "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'" which requires a literal 'Z' rather than actually parsing the timezone.

      Changing the string to "yyyy-MM-dd'T'HH:mm:ss.SSSX" should work better.

            Assignee:
            Jeffrey Yemin
            Reporter:
            Frej Bjon
            None
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: