UTC_DATE is a MySQL and MariaDB built-in date function that outputs the current calendar date based on Coordinated Universal Time, ignoring the session or server time zone. The function is deterministic within a single statement and non-deterministic across statements because the value changes as days roll over at 00:00:00 UTC. UTC_DATE returns a value of type DATE (not DATETIME), so no time component is included. Parentheses are optional, but using them is recommended for clarity. When used in numeric context, the result is returned as an integer in the form YYYYMMDD. If the server or connection time zone differs from UTC, UTC_DATE still returns the UTC value, making it useful for time-zone-agnostic logging, replication, and auditing.
MySQL 4.1
It returns a DATE value, which stores only the year, month, and day. No time information is included.
Parentheses are optional in MySQL, but using them (UTC_DATE()) improves readability and avoids potential parser confusion in complex expressions.
CURDATE returns the current date in the session's time zone, while UTC_DATE returns the date in Coordinated Universal Time, independent of local settings.
Yes. For example, `SELECT * FROM logs WHERE event_date = UTC_DATE();` fetches rows whose event_date column matches the current UTC date.