UTC_TIME

UTC_TIME is a SQL function that returns the current time as a value in 'HH:MM:SS' or HHMMSS format, depending on whether the function is used in a string or numeric context. The returned time represents the Coordinated Universal Time (UTC).

UTC_TIME([precision])

  • precision: An optional parameter that specifies the fractional seconds precision of the returned time. It ranges from 0 (default) to 6, increasing the decimal places of the seconds component accordingly.

Example

SELECT UTC_TIME();

Output

'12:34:56'

Explanation

The UTC_TIME function in MySQL provides the current time based on the Coordinated Universal Time (UTC). The output format is ‘HH:MM:SS’.

For in-depth explanations and examples SQL keywords where you write your SQL, install our extension.