MaxGekk commented on issue #24195: [SPARK-25496][SQL] Deprecate 
from_utc_timestamp and to_utc_timestamp
URL: https://github.com/apache/spark/pull/24195#issuecomment-578042510
 
 
   You can append time zone names per each row:
   ```scala
   scala> val df = Seq(
     ("2019-01-24 11:30:00.123", "America/Los_Angeles"), 
     ("2020-01-01 01:30:00.123", "PST")).toDF("ts_str", "tz_name")
   df: org.apache.spark.sql.DataFrame = [ts_str: string, tz_name: string]
   
   scala> df.select(to_timestamp(concat_ws(" ", $"ts_str", $"tz_name"), 
"uuuu-MM-dd HH:mm:ss.SSS z").as("timestamp")).show(false)
   +-----------------------+
   |timestamp              |
   +-----------------------+
   |2019-01-24 22:30:00.123|
   |2020-01-01 12:30:00.123|
   +-----------------------+
   ```

----------------------------------------------------------------
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]

Reply via email to