MySQL UTC_TIMESTAMP

MySQL UTC_Timestamp function is one of the MySQL Date Functions, which returns the current UTC date and time value in YYYY-MM-DD HH:MM:SS or YYYYMMDDHHMMSS.uuu format. The basic syntax of the UTC timestamp Function in MySQL is as shown below:

UTC_TIMESTAMP;

UTC_TIMESTAMP();

MySQL UTC_TIMESTAMP Example

The following query shows the basic use of this MySQL UTC timestamp function.

SELECT UTC_TIMESTAMP;

SELECT UTC_TIMESTAMP();
MySQL UTC_TIMESTAMP Function 2

As you can see, both the above statements are showing current UTC date and time in YYYY-MM-DD HH:MM:SS format. This Date Function example shows you what happens when adding values to this UTC Timestamp function.

SELECT UTC_TIMESTAMP(), UTC_TIMESTAMP() + 0;

SELECT UTC_TIMESTAMP, UTC_TIMESTAMP + 23;
MySQL UTC_TIMESTAMP Function 3

As you can see, MySQL has added those extra seconds to the current UTC date and time stamp. Next, it is displaying the UTC time stamp in YYYYMMDDHHMMSS string format.