commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Duncan Jones (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (LANG-1000) ParseException when trying to parse UTC dates with Z as zone designator using DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT
Date Sun, 28 Sep 2014 10:13:33 GMT

     [ https://issues.apache.org/jira/browse/LANG-1000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Duncan Jones resolved LANG-1000.
--------------------------------
       Resolution: Fixed
    Fix Version/s:     (was: Patch Needed)
                   3.4

Author: djones
Date: Sun Sep 28 10:11:17 2014
New Revision: 1628061

URL: http://svn.apache.org/r1628061
Log:
Added missing support for ISO 8601 parsing and printing using "ZZ" pattern (code now matches
Javadoc). Addresses LANG-1000.

Modified:
    commons/proper/lang/trunk/src/changes/changes.xml
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/DateFormatUtilsTest.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDatePrinterTest.java

> ParseException when trying to parse UTC dates with Z as zone designator using DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LANG-1000
>                 URL: https://issues.apache.org/jira/browse/LANG-1000
>             Project: Commons Lang
>          Issue Type: Bug
>    Affects Versions: 3.3.2
>            Reporter: Holger Stenzhorn
>            Assignee: Duncan Jones
>            Priority: Minor
>             Fix For: 3.4
>
>
> 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:
> {code}
> java.text.ParseException: Unparseable date: "2013-11-18T12:48:05Z" does not match
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message