You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/04 04:04:52 UTC

[GitHub] [beam] kennknowles opened a new issue, #19593: CAST Timestamp -> String doesn't properly handle timezones with sub-minute offsets

kennknowles opened a new issue, #19593:
URL: https://github.com/apache/beam/issues/19593

   One of the timestamp -\> string test cases is -62135596800000000 microseconds from the unix epoch, or 01/01/0001 00:00:00 GMT
   
   Technically the timezone offset at this time in America/Los_Angeles is -07:52:58. This causes the following error:
   
   Expected: ARRAY<STRUCT<ColA STRING\>\>[{"0000-12-31 16:08:00-07:52"}]
     Actual: ARRAY<STRUCT<ColA STRING\>\>[{"0000-12-31 16:07:02-07:52"}]
   
   Note that ZetaSQL expects us to completely truncate the second part of the offset. It's not used when subtracting from the origin datetime, and it's not included in the offset string. However when we perform this conversion, joda time uses the second part of the offset, and thus our time string is off by 58 seconds.
   
   Imported from Jira [BEAM-8073](https://issues.apache.org/jira/browse/BEAM-8073). Original Jira may contain additional context.
   Reported by: amaliujia.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org