Github user yu-iskw commented on the pull request:
https://github.com/apache/spark/pull/8264#issuecomment-132218883
@rxin it seems that `from_unixtime` and `unix_timestamp` depends on the
default time zone setting.
I'm working at JST (UTC+9), but the Jenkins is at PDT(UTC-7). So those
errors as follows might occur because of the time difference.
At least, we can''t set a time zone of `from_unixtime` and
`unix_timestamp`. Is that OK?
For example, `from_unixtime(1000)`
- JST(UTC+9) => "1970-01-01 09:16:40"
- PDT(UTC-7) => "1969-12-31 16:16:40"
### Jenkins Ouput
```
1. Failure (at test_sparkSQL.R#797): date functions on a DataFrame
-------------
collect(select(df2, unix_timestamp(lit("2015-01-01"), "yyyy-MM-dd")))[1, 1]
not equal to 1420038000
1.42e+09 - 1.42e+09 == -61200
2. Failure (at test_sparkSQL.R#802): date functions on a DataFrame
-------------
collect(select(df3, from_unixtime(df3$a)))[, 1] not equal to c("1970-01-01
09:16:40", "1970-01-01 08:43:20")
2 string mismatches:
x[1]: "1970-01-01 09:16:40"
y[1]: "1969-12-31 16:16:40"
x[2]: "1970-01-01 08:43:20"
y[2]: "1969-12-31 15:43:20"
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]