TIMEZONE
Returns the timezone for the current connection.
Databend uses UTC (Coordinated Universal Time) as the default timezone and allows you to change the timezone to your current geographic location. For the available values you can assign to the timezone
setting, refer to
Open in the new tab
Syntax
SELECT TIMEZONE();
Examples
-- Return the current timezone
SELECT TIMEZONE();
+-----------------+
| TIMEZONE('UTC') |
+-----------------+
| UTC |
+-----------------+
-- Set the timezone to China Standard Time
SET timezone='Asia/Shanghai';
SELECT TIMEZONE();
+---------------------------+
| TIMEZONE('Asia/Shanghai') |
+---------------------------+
| Asia/Shanghai |
+---------------------------+