-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7265 from soyeric128/new-time-formats
docs: new time formats
- Loading branch information
Showing
3 changed files
with
126 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
docs/doc/30-reference/20-functions/30-datetime-functions/timezone.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
title: 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 https://docs.rs/chrono-tz/latest/chrono_tz/enum.Tz.html. See the examples below for details. | ||
|
||
## Syntax | ||
|
||
``` | ||
SELECT TIMEZONE(); | ||
``` | ||
|
||
## Examples | ||
|
||
```sql | ||
-- 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 | | ||
+---------------------------+ | ||
``` |
32 changes: 0 additions & 32 deletions
32
docs/doc/30-reference/20-functions/90-context-functions/timezone.md
This file was deleted.
Oops, something went wrong.
fd4c6f9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
databend – ./
databend-git-main-databend.vercel.app
databend.vercel.app
databend-databend.vercel.app
databend.rs