MySQL UTC_TIMESTAMP

MySQL UTC_Timestamp function is one of the 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 is as shown below:

UTC_TIMESTAMP;

UTC_TIMESTAMP();

MySQL UTC_TIMESTAMP Example

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

SELECT UTC_TIMESTAMP;

SELECT UTC_TIMESTAMP();
UTC TIME STAMP Example 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 method.

SELECT UTC_TIMESTAMP(), UTC_TIMESTAMP() + 0;

SELECT UTC_TIMESTAMP, UTC_TIMESTAMP + 23;

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.

UTC_TIMESTAMP Example 3