Scalar function
NULL timestamp with a valid timezone yields NULL. NULL timezone yields NULL. A non-NULL invalid timezone raises an error and can be validated even when the timestamp is NULL.
Syntax
Scalar
Arguments
Returns
- Type: TIMESTAMP without a time zone
- NULL behavior: NULL timestamp with a valid timezone yields NULL. NULL timezone yields NULL. A non-NULL invalid timezone raises an error and can be validated even when the timestamp is NULL.
Properties
Usage notes
- The function changes the clock time and returns a TIMESTAMP without a time zone.
- The time zone can be a constant or a column with a different time zone for each row.
- The function looks up the zone’s offset at the input treated as a UTC instant, then subtracts that offset. For local times repeated or skipped by daylight-saving changes, this can differ from MAKE_TIMESTAMP or CONVERT_TIMEZONE.
Examples
Basic example
Convert local time to UTC on the previous day
Limitations
- For a timestamp before 1970-01-01 00:00:00 UTC with fractional seconds, a time-zone offset near a historical clock change can be incorrect. Avoid that combination.
Last modified on October 15, 2026