utc_timestamp

Description

Returns the current UTC date and time as a value in 'YYYY-MM-DD HH:MM:SS.SSS' or 'YYYYMMDDHHMMSSFFF' format depending on the usage of the function, for example, in a string or numeric context.

Syntax

DATETIME UTC_TIMESTAMP()

Examples

MySQL > select utc_timestamp(),utc_timestamp() + 1;
+----------------------------+-----------------------+
| utc_timestamp()            | (utc_timestamp()) + 1 |
+----------------------------+-----------------------+
| 2023-11-20 06:51:46.767000 |        20231120065147 |
+----------------------------+-----------------------+

utc_timestamp() + N means adding N seconds to the current time.

keyword

UTC_TIMESTAMP,UTC,TIMESTAMP