I have dates in the format 2008-12-23T00:00:00Z . This is very similar to the ISO 8601 format with the Zulu time zone (UTC). I though the following code would analyze it (using commons-lang ):
String pattern = DateFormatUtils.ISO_DATETIME_TIME_ZONE_FORMAT.getPattern(); Date d = DateUtils.parseDate(dateToParse, new String[] { pattern });
If I take the same template ( yyyy-MM-dd'T'HH:mm:ssZZ ), but delete the time zone, it works.
Do you know how I can find out the time zone of Zulu? I only have access to Java 1.4 and Jakarta commons-lang. No Joda Time for me yet ...
java date timezone parsing
Guillaume Jan 08 '09 at 14:55 2009-01-08 14:55
source share