forked from facebookincubator/velox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix to_iso8601 to use Z for UTC (facebookincubator#11279)
Summary: Presto's to_iso8601 UDF uses JODA's default ISODateTimeFormat.dateTime() formatter which uses the string 'Z' in place of the time zone offset if the time zone is UTC. https://www.joda.org/joda-time/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime-- Internally JODA's DateTimeFormatter does this by taking an optional hard coded string to use for the time zone offset if it's zero. I added something similar to Velox's DateTimeFormatter.format and setting it in the to_iso8601 implementation. I checked and other Presto UDFs that format TimestampWithTimeZones as strings, e.g. format_datetime, do not use this option, so they do not need to be updated. Reviewed By: bikramSingh91 Differential Revision: D64488962
- Loading branch information
1 parent
838b486
commit 0e5f3b0
Showing
4 changed files
with
22 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters