[ 
https://issues.apache.org/jira/browse/SPARK-16384?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sean Owen resolved SPARK-16384.
-------------------------------
    Resolution: Not A Problem

> FROM_UNIXTIME reports incorrect days
> ------------------------------------
>
>                 Key: SPARK-16384
>                 URL: https://issues.apache.org/jira/browse/SPARK-16384
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 1.6.1, 1.6.2, 2.0.0
>            Reporter: Frank Stratton
>
> Timestamps between 2015-12-27 and 2015-12-31 are reported in the incorrect 
> year (2016-12-*):
> {quote}
> results = sqlContext.sql("SELECT FROM_UNIXTIME(1451088000, 'YYYY-MM-dd')")   
> # 2015-12-26
> print results.collect()
> results = sqlContext.sql("SELECT FROM_UNIXTIME(1451174400, 'YYYY-MM-dd')")   
> # 2015-12-27
> print results.collect()
> results = sqlContext.sql("SELECT FROM_UNIXTIME(1451260800, 'YYYY-MM-dd')")   
> # 2015-12-28
> print results.collect()
> results = sqlContext.sql("SELECT FROM_UNIXTIME(1451347200, 'YYYY-MM-dd')")   
> # 2015-12-29
> print results.collect()
> {quote}
> outputs:
> {quote}
> [Row(_c0=u'2015-12-26')]
> [Row(_c0=u'2016-12-27')]
> [Row(_c0=u'2016-12-28')]
> [Row(_c0=u'2016-12-29')]
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to