Details
Description
DATE_TRUNC_STR returns null for ISO8601 strings which end in "Z" (shortcut for UTC).
To reproduce, use this query from the documentation:
SELECT DATE_TRUNC_STR('2016-05-18T03:59:00Z', 'day') as day, |
DATE_TRUNC_STR('2016-05-18T03:59:00Z', 'month') as month, |
DATE_TRUNC_STR('2016-05-18T03:59:00Z', 'year') as year; |
On 5.1.0, this outputs the expected results. On 5.5.0 Beta, it returns null for all 3 fields.
This appears to only be related to the Z shortcut for UTC, if you include a specific offset of "+00:00" or no offset at all the function works correctly.