You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/06/03 11:05:05 UTC

[GitHub] [spark] MaxGekk commented on pull request #28709: [WIP][SQL] Make legacy date formatters independent from the default JVM time zone

MaxGekk commented on pull request #28709:
URL: https://github.com/apache/spark/pull/28709#issuecomment-638123922


   @cloud-fan @HyukjinKwon The changes can lead to inconsistent behaviour when JVM and session time zones are different:
   ```scala
   $ export TZ="Europe/Moscow"
   $ ./bin/spark-sql -S
   spark-sql> set spark.sql.session.timeZone=America/Los_Angeles;
   spark.sql.session.timeZone	America/Los_Angeles
   spark-sql> select date '2020-06-03';
   2020-06-02
   spark-sql> select make_date(2020, 6, 3);
   2020-06-02
   ```
   This happens because `toJavaDate()` w/ the default JVM time zone is used while collecting dates.
   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org