[ 
https://issues.apache.org/jira/browse/SPARK-30668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17025681#comment-17025681
 ] 

Maxim Gekk edited comment on SPARK-30668 at 1/29/20 8:43 AM:
-------------------------------------------------------------

[~marmbrus] The doc for `to_timestamp` points out DateTimeFormatter: 
https://github.com/apache/spark/blob/d69ed9afdf2bd8d03aaf835292b92692ec8189e9/sql/core/src/main/scala/org/apache/spark/sql/functions.scala#L2964,
 please, have a look at its doc 
https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
 to see which patterns for time zone and zone offset it supports /cc [~srowen] 
[~dongjoon]


was (Author: maxgekk):
If [~marmbrus] develops something new, he could use correct pattern for zone 
offsets as it is pointed out in the Java docs: 
https://github.com/apache/spark/blob/d69ed9afdf2bd8d03aaf835292b92692ec8189e9/sql/core/src/main/scala/org/apache/spark/sql/functions.scala#L2964
 /cc [~srowen] [~dongjoon]

> to_timestamp failed to parse 2020-01-27T20:06:11.847-0800 using pattern 
> "yyyy-MM-dd'T'HH:mm:ss.SSSz"
> ----------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-30668
>                 URL: https://issues.apache.org/jira/browse/SPARK-30668
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 3.0.0
>            Reporter: Xiao Li
>            Priority: Blocker
>
> {code:java}
> SELECT to_timestamp("2020-01-27T20:06:11.847-0800", 
> "yyyy-MM-dd'T'HH:mm:ss.SSSz")
> {code}
> This can return a valid value in Spark 2.4 but return NULL in the latest 
> master



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to