UTC_TIME()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Returns the current time of day in the UTC timezone.
USAGE
UTC_TIME([precision])
Argument Name | Description |
|---|---|
| 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.
EXAMPLES
SELECT UTC_TIME();
+------------+
| UTC_TIME() |
+------------+
| 21:14:05 |
+------------+
SELECT UTC_TIME()+0;
+--------------+
| UTC_TIME()+0 |
+--------------+
| 210501.0000 |
+--------------+
