UTC_TIME()

Overview

Returns the current time of day in the UTC timezone.

USAGE

UTC_TIME([precision])

Argument Name

Description

precision

The number of desired decimal digits (0-6). Default: 0

DETAILS

UTC_TIME() is a date-time function that returns the current time of day in the UTC timezone (Coordinated Universal Time).

If the precision argument is specified, it controls how many decimal digits of fractional seconds are included in the return value. The precision can range from 0 to 6 and defaults to 0.

In string context, the return value is formatted as hh:mm:ss.uuuuuu. If the requested precision is 0, no decimal point is included in the return value.

In numeric context, the return value is formatted as hhmmss.uuuuuu. The return value is always a DOUBLE data type, even when the requested precision is 0.

See CURTIME() for an equivalent function using the currently active timezone.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT UTC_TIME();
+------------+
| UTC_TIME() |
+------------+
| 21:14:05   |
+------------+
SELECT UTC_TIME()+0;
+--------------+
| UTC_TIME()+0 |
+--------------+
|  210501.0000 |
+--------------+

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES