MaxGekk commented on issue #24185: [SPARK-27252][SQL] Make current_date() independent from time zones URL: https://github.com/apache/spark/pull/24185#issuecomment-476578718 > timestamp is timezone dependent while **date is not**. For current_date, it seems the timezone **shifting is reasonable**. The **current_date()** returns a value of DateType which is time zone independent, and actually stores number of days since epoch (in UTC time zone). And Spark assumes that in many places. How can it be shifted by time zone offset? > when I run current_date in a database, I'd expect the result matches my local calendar. I would guess you speak about textual representation of current_date result? If so, conversion `DateType` -> `StringType` should care about time zone offset which what the `date_format()` function does.
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
