Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-1000

ParseException when trying to parse UTC dates with Z as zone designator using DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.3.2
    • 3.4
    • None
    • None

    Description

      I have the String 2013-11-18T12:48:05Z which I want to parse into a Date using DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.

      According to http://en.wikipedia.org/wiki/ISO_8601#UTC the Z at the end should be a valid abbreviation for UTC+00:00 (or UTC) and so all should be fine.

      But when I am trying to do so I get the following exception:

      java.text.ParseException: Unparseable date: "2013-11-18T12:48:05Z" does not match
      

      Attachments

        Activity

          People

            dmjones500 Duncan Jones
            host Holger Stenzhorn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: