Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions docs/src/main/sphinx/language/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,27 @@ The following examples illustrate the behavior::
Instant in time that includes the date and time of day with ``P`` digits of
precision for the fraction of seconds and with a time zone. Values of this
type are rendered using the time zone from the value.
Time zones are expressed as the numeric UTC offset value::
Time zones can be expressed in the following ways:

* ``UTC``, with ``GMT``, ``Z``, or ``UT`` usable as aliases for UTC.
* ``+hh:mm`` or ``-hh:mm`` with ``hh:mm`` as an hour and minute offset from UTC.
Can be written with or without ``UTC``, ``GMT``, or ``UT`` as an alias for
UTC.
* An `IANA time zone name <https://www.iana.org/time-zones>`_.

The following examples demonstrate some of these syntax options::

SELECT TIMESTAMP '2001-08-22 03:04:05.321 UTC';
-- 2001-08-22 03:04:05.321 UTC

SELECT TIMESTAMP '2001-08-22 03:04:05.321 -08:30';
-- 2001-08-22 03:04:05.321 -08:30

TIMESTAMP '2001-08-22 03:04:05.321 -08:00';
-- 2001-08-22 03:04:05.321-08:00
SELECT TIMESTAMP '2001-08-22 03:04:05.321 GMT-08:30';
-- 2001-08-22 03:04:05.321 -08:30

SELECT TIMESTAMP '2001-08-22 03:04:05.321 America/New_York';
-- 2001-08-22 03:04:05.321 America/New_York

``INTERVAL YEAR TO MONTH``
^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down