UTC_ TIMESTAMP
On this page
Returns the current time, in the UTC time zone.
Syntax
UTC_TIMESTAMP()
Return Type
Datetime object.
Examples
You can specify a precision of 0 (the default) or 6 digits for the fraction of seconds.
SELECT UTC_TIMESTAMP();
+---------------------+
| UTC_TIMESTAMP() |
+---------------------+
| 2022-01-10 13:10:06 |
+---------------------+
SELECT UTC_TIMESTAMP(0);
+---------------------+
| UTC_TIMESTAMP(0) |
+---------------------+
| 2022-01-10 13:10:09 |
+---------------------+
1 row in set (0.084 sec)
SELECT UTC_TIMESTAMP(6);
+----------------------------+
| UTC_TIMESTAMP(6) |
+----------------------------+
| 2022-01-10 13:10:12.113996 |
+----------------------------+
1 row in set (0.001 sec)
Related Topics
Last modified: May 31, 2023