如果时区为 +00:00,为什么我的服务器显示不同的 utc 时间戳和当前时间戳?

Why is my server shows different timestamp for utc and current timestamp if the timezone is +00:00?

在做研究时我很好奇为什么当我执行以下查询时我的服务器显示不同的时间戳?

select current_timestamp(), UTC_TIMESTAMP(), convert_tz(UTC_TIMESTAMP(), 
@@session.time_zone,"+00:00") as timezone_utc, 
convert_tz(current_timestamp(), @@session.time_zone,"+00:00") as timezone_current

输出:

current_timestamp() || UTC_TIMESTAMP() || timezone_utc || timezone_current

2015-04-02 03:01:25 || 2015-04-02 08:01:25 || 2015-04-02 13:01:25 || 2015-04-02 08:01:25

因为你告诉它,它相信你所说的。 convert_tz(UTC_TIMESTAMP(), @@session.time_zone,"+00:00") 说取当前的 UTC 时间,假装它实际上是本地时间,然后通过添加与本地时区偏移量相反的时间将其转换为 UTC。这是一件荒谬的事情,得到了荒谬的结果。