abp002 opened a new pull request, #407: URL: https://github.com/apache/datafusion-spark/pull/407
## Which issue does this PR close? - Closes #354. - Closes #110. ## Rationale for this change Explained in the issues. ## What changes are included in this PR? `to_utc_timestamp` now parses the zone with `TimeZoneRules::parse` and converts with `TimeZoneRules::local_to_utc`, the same code `from_utc_timestamp` uses in the other direction. Like `from_utc_timestamp`, it parses a repeated zone once. Offsets beyond 18 hours and `ROC` are now errors, as in Spark. Arrow accepted them before. ## Are these changes tested? Yes, in `datetime/to_utc_timestamp.slt`. The two cases marked `xfail spark` for #110 now expect Spark's results, and there are new cases for the gap, the overlap and the zone spellings. I checked the file with the PySpark runner on Spark 4.2.0. ## Are there any user-facing changes? Yes. `to_utc_timestamp` returns Spark's result near a daylight saving time change and accepts zone IDs such as `GMT+1` and `PST`. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
