Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Databricks 中运行代码,但不知何故 unixtimestamp 值没有什么不同。在调试时我知道了,因为 databricks 配置了 UTC 时区。请告知如何在 Databricks 中将默认时区更改为 EST。
可以在集群->配置->高级选项->spark中设置,设置spark参数:spark.sql.session.timeZone Hongkong。它将影响任何 sql 语句时区。
如果要为所有数据节点设置时区,则需要添加一个初始脚本并设置 unix 时区。所以像 python datetime.dateime.now() 这样的东西将是设置的时区。