Scalar function
NULL value yields NULL. NULL timezone uses default interpretation. Invalid text/timezones and nonexistent local times raise errors.
Syntax
Scalar
Arguments
Returns
- Type: TIMESTAMP with UTC timezone
- NULL behavior: NULL value yields NULL. NULL timezone uses default interpretation. Invalid text/timezones and nonexistent local times raise errors.
Properties
Usage notes
- DATE input means midnight, optionally interpreted in the supplied timezone, then converted to UTC.
- If midnight occurs twice because of a local clock change, DATE input selects the earlier instant.
- Without an explicit time zone, TIMESTAMP input keeps the same instant and the result uses UTC. With a time zone, the input’s UTC clock values are interpreted as local time in that zone; the input’s original time-zone label does not control this interpretation.
- DATE input with a time zone means midnight in that zone, converted to UTC. For TIMESTAMP input, a local time repeated by a clock change selects the earlier instant; a skipped local time raises an error.
Examples
Basic example
Convert a date at midnight
Last modified on October 15, 2026