Help Center/ GaussDB/ Developer Guide(Centralized_V2.0-8.x)/ FAQ/ Which Date/Time Types Contain the Time Zone and Which Do Not?
Updated on 2025-05-29 GMT+08:00

Which Date/Time Types Contain the Time Zone and Which Do Not?

Answer: The date, time, timestamp, and smalldatetime types do not contain the time zone, and the timetz and timestamptz types contain the time zone.

Example:

--The timestamp type does not contain the time zone.
gaussdb=# SELECT '2019-01-01'::timestamp;
      timestamp      
---------------------
 2019-01-01 00:00:00
(1 row)

--The timestamptz type contains the time zone.
gaussdb=# SELECT '2019-01-01'::timestamptz;
      timestamptz       
------------------------
 2019-01-01 00:00:00+08
(1 row)