-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
enhancementNew feature or requestNew feature or request
Description
test case:
drop table if exists t;
create table if not exists t(c timestamp(6));
set time_zone='+08:00';
insert t select now(6);
insert t select utc_timestamp(6);
table t;
mysql 输出:
+----------------------------+
| c |
+----------------------------+
| 2025-04-02 15:33:08.110326 |
| 2025-04-02 07:33:08.758054 |
+----------------------------+
2 rows in set (0.00 sec)
openHalo 输出:
+----------------------------+
| c |
+----------------------------+
| 2025-04-02 15:34:24.749217 |
| 2025-04-02 07:34:24.749784 |
+----------------------------+
2 rows in set (0.00 sec)
当前时间:
mysql> \! timedatectl
Local time: Wed 2025-04-02 15:34:02 CST
Universal time: Wed 2025-04-02 07:34:02 UTC
RTC time: Wed 2025-04-02 16:33:59
Time zone: Asia/Shanghai (CST, +0800)
System clock synchronized: no
NTP service: active
RTC in local TZ: no
mysql>
设定时区为 +0,再次读取数据:
set time_zone='+00:00';
mysql 输出:
+----------------------------+
| c |
+----------------------------+
| 2025-04-02 07:33:08.110326 |
| 2025-04-01 23:33:08.758054 |
+----------------------------+
2 rows in set (0.00 sec)
openHalo:
+----------------------------+
| c |
+----------------------------+
| 2025-04-02 15:34:24.749217 |
| 2025-04-02 07:34:24.749784 |
+----------------------------+
2 rows in set (0.00 sec)
此时,发现mysql与openhalo输出不一致。
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request