linhongliu-db opened a new pull request #34338: URL: https://github.com/apache/spark/pull/34338
### What changes were proposed in this pull request? Use `ZoneId.of()` to handle timezone string in `DatetimeUtils.stringToTimestamp()` instead of manually splitting it into hours and minutes. ### Why are the changes needed? In current implementation. we will split the timezone string into hours and minutes. But if there is no colon in the timezone, the full digits will be treated as hours, then we couldn't get the correct value. For example: `2021-10-11T03:58:03.000+0700` will return null, but "+0700" is actually correct format that accepted by `ZoneId.of()` ### Does this PR introduce _any_ user-facing change? bugfix. this allows Spark to accept a more valid timezone format. ### How was this patch tested? newly added UT -- 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]
