Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-5279

More Complete ISO 8601 Date Support

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Epic Color:
      ghx-label-7

      Description

      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:

      -- 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")
      

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jackowaya Alan Jackoway
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: