You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Alan Jackoway (JIRA)" <ji...@apache.org> on 2017/05/03 21:04:04 UTC

[jira] [Created] (IMPALA-5279) More Complete ISO 8601 Date Support

Alan Jackoway created IMPALA-5279:
-------------------------------------

             Summary: More Complete ISO 8601 Date Support
                 Key: IMPALA-5279
                 URL: https://issues.apache.org/jira/browse/IMPALA-5279
             Project: IMPALA
          Issue Type: Improvement
            Reporter: Alan Jackoway


I am trying to handle dates that came in as ISO 8601 format including a time zone offset and having a lot of trouble. Here are two things I expected to work, but did not:
{code:sql}
-- Casting to dates with time zone offsets. These results should be different
select cast("2014-09-24T12:29:19 -07:00" as timestamp), cast("2014-09-24 12:29:19 -08:00" as timestamp); 
-- Format string for time zone offset
select unix_timestamp("2014-09-24 12:29:19 -07:00", "yyyy-MM-dd HH:mm:ss Z")
{code}

There may be other gotchas around ISO-8601 handling, but those are the two I ran into today.

I also couldn't find documentation on the format string for unix_timestamp, though it seemed to work the way https://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html does other than perhaps time zone and things I've never attempted like era.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)