adaitche edited a comment on issue #24195: [SPARK-25496][SQL] Deprecate from_utc_timestamp and to_utc_timestamp URL: https://github.com/apache/spark/pull/24195#issuecomment-578034888 > If input strings don't contain time zone info, you can either: > > * append time zone id string manually, or > * temporary set SQL config `spark.sql.session.timeZone` while parsing timestamp strings. Regarding the first approach. With zone id string, you have something like `+01:00` in mind, right? In many cases the offset is variable due to daylight saving time. I didn't find a way to specify a variable-offset-timezone in the datetime string. Is there any way? Regarding the second approach. In my scenario this is not possible unfortunately. The timezone of the source datetime varies per row. The only working option for this scenario I am aware of is using the `to_utc_timestamp` or `from_utc_timestamp` functions. I definitely agree that the semantics of these functions are difficult to understand which can lead to mistakes. It took me sometime to understand what they are actually doing. But unfortunately, I am not aware of an alternative.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
