Unparseable date: "2009-06-11 14:35:08 GMT-04:00 " on AIX 64 bits machine.

Unparseable date: "2009-06-11 14:35:08 GMT-04:00 " on AIX 64 bits machine.

book

Article ID: KB0084709

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Resolution:
When using tib:parse-dateTime("yyyy-MM-dd HH:mm:ss zzz ",  "2009-06-11 14:35:08 GMT-04:00 ") to get the datetime in AIX, it throws Unparseable date: "2009-06-11 04:35:08 GMT-04:00". This issue only happens on AIX 64bits machine; it works fine in the Windows.
If you try to use java code to parse the same string and the same format, it works fine in AIX. For example:
        SimpleDateFormat  sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss zzz");
        sdf.setLenient(true);
        Date date = sdf.parse("2009-06-11 14:35:08 GMT-04:00");

But when you set Lenient to false, you can get the same error in AIX. For example:
            SimpleDateFormat  sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss zzz");
        sdf.setLenient(false);
        Date date = sdf.parse("2009-06-11 14:35:08 GMT-04:00");

This issue is caused by a JVM bug. Please check below URL
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6247963
This defect is addressed in AIX 64bits machine. So this is why we only see this issue in the AIX which is a 64bits machine.

This issue is caused by more strictly validation in the timezone offset. The only workaround here is voiding the timezone character, such as zzz or Z in the format.

Issue/Introduction

Unparseable date: "2009-06-11 14:35:08 GMT-04:00 " on AIX 64 bits machine.