TIMEZONE(Lakehouse v1)
返回当前连接的时区。
PlaidCloud Lakehouse 默认使用 UTC(协调世界时)作为时区,并允许将时区更改为您当前所在的地理位置。timezone 设置可使用的取值请参阅 https://docs.rs/chrono-tz/latest/chrono_tz/enum.Tz.html。详见下面的示例。
Analyze 语法
Section titled “Analyze 语法”func.timezone()Analyze 示例
Section titled “Analyze 示例”func.timezone()┌─────────────────────┐│ timezone │├─────────────────────┤│ UTC │└─────────────────────┘SQL 语法
Section titled “SQL 语法”SELECT TIMEZONE();SQL 示例
Section titled “SQL 示例”-- Return the current timezoneSELECT TIMEZONE();┌─────────────────┐│ TIMEZONE('UTC') │├─────────────────┤│ UTC │└─────────────────┘
-- Set the timezone to China Standard TimeSET timezone='Asia/Shanghai';
SELECT TIMEZONE();┌───────────────────────────┐│ TIMEZONE('Asia/Shanghai') │├───────────────────────────┤│ Asia/Shanghai │└───────────────────────────┘