You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: datafusion/functions/src/datetime/current_time.rs
+18-3Lines changed: 18 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -39,9 +39,24 @@ The `current_time()` return value is determined at query time and will return th
39
39
40
40
The session time zone can be set using the statement 'SET datafusion.execution.time_zone = desired time zone'. The time zone can be a value like +00:00, 'Europe/London' etc.
41
41
"#,
42
-
syntax_example = r#"current_time()
43
-
(optional) SET datafusion.execution.time_zone = '+00:00';
44
-
SELECT current_time();"#
42
+
syntax_example = "current_time()",
43
+
sql_example = r#"```sql
44
+
> SELECT current_time();
45
+
+--------------------+
46
+
| current_time() |
47
+
+--------------------+
48
+
| 06:30:00.123456789 |
49
+
+--------------------+
50
+
51
+
-- The current time is based on the session time zone (UTC by default)
52
+
> SET datafusion.execution.time_zone = 'Europe/London';
0 commit comments