Postgresql 在TIMESTAMP WITH TIMEZONE 中存储时区信息?

Postgresql stores timezone information in TIMESTAMP WITH TIMEZONE?

我试图了解 PostgreSQL 如何处理 TIMESTAMP WITH TIMEZONE 类型,我 运行 陷入理论与实践之间的差异。

根据文档和其他堆栈溢出帖子,

For timestamp with time zone, the internally stored value is always in UTC ... When a timestamp with time zone value is output, it is always converted from UTC to the current timezone zone.

我相信这意味着任何给定 SELECT 语句中的所有时间戳都将在 same/current 时区内。然而,这就是我所看到的:

interview_timestamp 是带时区的时间戳。这让我大吃一惊。

奇怪的是,您有时会看到时区偏移,有时却看不到,我会责怪您使用的 GUI。尝试使用 psql 并查看那里的数据。

偏移量“-05:44:38”完全正常,因为 time zones 是在 19 世纪后期引入的,在此之前使用的是当地太阳时。

郑重声明,这确实是客户端的事情,因为与 UTC 的偏移量取决于一年中的时间(EDT:-4,EST:-5)。偏移量“-05:44:38”也是正确的,这是 TZ 数据库中 1883 年之前 EDT/EST 的偏移量。