Mega Code Archive

 
Categories / MySQL Tutorial / Date Time Functions
 

UTC_TIMESTAMP() returns the current UTC date and time

The format is in 'YYYY-MM-DD HH:MM:SS' or YYYYMMDDHHMMSS format, depending on whether the function is used in a string or numeric context. mysql> mysql> SELECT UTC_TIMESTAMP(), UTC_TIMESTAMP() + 0; +---------------------+-----------------------+ | UTC_TIMESTAMP()     | UTC_TIMESTAMP() + 0   | +---------------------+-----------------------+ | 2007-07-23 02:46:23 | 20070723024623.000000 | +---------------------+-----------------------+ 1 row in set (0.00 sec) mysql>