#34 Incorrect parsing of the ISO 8601 time zone

open
nobody
CSWClients (6)
5
2012-12-31
2012-12-31
Rafael Bedia
No

The IsoDateTimerParser class incorrectly parses the time zone portion of the ISO 8601 date time sent in CSW responses. This causes the time zone to be ignored and the time to be interpreted as GMT which leads to incorrect results in incremental harvesting.

The problem is with the value being passed to TimeZone.getTimeZone(). It expects the input to be in the form "GMT<sign><hour>:<minute>" but Geoportal passes "GMT <hour><minute>" which matches nothing. The important difference to note is that Geoportal adds a space after GMT and is stripping away the minus and the colon. The colon is optional for TimeZone.getTimeZone() but the minus is critical for distinguishing timezone offsets.

I have attached a patch that passes the timezone to TimeZone.getTimeZone() in the format that it requires.

Discussion

  • Rafael Bedia
    Rafael Bedia
    2012-12-31

    Patch for fixing the timezone parsing bug