I have a string like:
2018-03-21T08:15:00+01:00
and wonder how to preserve the time zone / shift from UTC when parsing it in Spark.
Seq("2018-03-21T08:15:00+01:00").toDF.select('value, to_timestamp('value, "yyy-MM-ddTHH:mm:ss")).show(false)
unfortunately only yields null
. Even my format string which is omitting the shift only returns null
.