UTC_TIMESTAMP

2023-07-28 02:53:17  Updated

Syntax

UTC_TIMESTAMP([fsp])

Purpose

UTC_TIMESTAMP() returns the current UTC date in the %Y-%m-%d %H:%i:%s format.

The fsp argument specifies the precision of the second part, and the valid values are an integer from 0 to 6.

Examples

obclient> SELECT UTC_TIMESTAMP(), UTC_TIMESTAMP() + 0, UTC_TIMESTAMP() + 6;
+---------------------+---------------------+---------------------+
| UTC_TIMESTAMP()     | UTC_TIMESTAMP() + 0 | UTC_TIMESTAMP() + 6 |
+---------------------+---------------------+---------------------+
| 2021-07-13 13:10:28 |      20210713131028 |      20210713131034 |
+---------------------+---------------------+---------------------+
1 row in set

Contact Us