According to the documentation, "for timestamp with time zone, the internally stored value is always in UTC (Universal Coordinated Time, traditionally known as Greenwich Mean Time, GMT). An input value that has an explicit time zone specified is converted to UTC using the appropriate offset for that time zone. If no time zone is stated in the input string, then it is assumed to be in the time zone indicated by the system's TimeZone parameter, and is converted to UTC using the offset for the timezone zone.".
This explanation appears to conflict with the statement regarding the handling of timestamp with time zone. For instance, I set the system's TimeZone to US/Eastern and executed the command select '2025-02-12T6:30:04'::timestamptz. I anticipated the result to be 2025-02-12T11:30:04+00:00, as there is no time zone specified in the input string 2025-02-12T6:30:04. Therefore, it should default to the system's TimeZone parameter, which is US/Eastern, and subsequently convert to UTC using the offset between UTC and US/Eastern.
However, the actual return result was 2025-02-12T06:30:04-05:00, which represents a timestamp in US/Eastern rather than UTC.
Am I misunderstanding the documentation, or is there an error in the documentation itself?
SET TimeZone = 'EST'? Not a good idea as that pins to one of two time zones that exist on the east coast. Better to use something likeset timezone = 'US/Eastern';. 2) The result is correct, this'2025-02-12T6:30:04'is taken to be atESTand rotated toUTCfor storage. On retrieval it is rotated back fromUTCtoEST. To get what you want:select '2025-02-12T6:30:04'::timestamptz at time zone 'UTC'; 2025-02-12 11:30:04. 4) For the complete why?, see Time Stamps.