You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 24.04.1 LTS安装/升级后date与ls命令显示UTC时间而非本地CDT时区时间的问题求助

Ubuntu 24.04.1 LTS安装/升级后date与ls命令显示UTC时间而非本地CDT时区时间的问题求助

各位好,我最近把系统升级到了Ubuntu 24.04.1 LTS,结果遇到了个头疼的问题:date命令总是输出UTC时间,而不是我本地的CDT时区时间。

我先检查了系统的时区设置,用timedatectl命令输出的结果显示时区配置是正确的:

$ timedatectl
                Local time: Sun 2024-09-29 14:14:24 CDT
            Universal time: Sun 2024-09-29 19:14:24 UTC
                    RTC time: Sun 2024-09-29 19:14:24
                Time zone: America/Chicago (CDT, -0500)
System clock synchronized: yes
                NTP service: active
            RTC in local TZ: no

明明本地时区显示没问题,但date命令却还是固执地输出UTC时间:

$ date
Sun Sep 29 07:15:00 PM  2024

更奇怪的是,用ls -l查看文件时间戳时,显示的也是UTC时间:

$ touch x
$ ls -l x
-rw-rw-r-- 1 tmacd tmacd 0 Sep 29 19:22 x

我也确认了时区文件的软链接是正确指向目标时区文件的:

$ ls -l /etc/localtime
lrwxrwxrwx 1 root root 35 Sep 23 19:39 /etc/localtime -> /usr/share/zoneinfo/America/Chicago

有没有大佬遇到过类似的问题?求帮忙看看怎么解决,让date和ls都能正常显示本地CDT时区的时间。

备注:内容来源于stack exchange,提问作者tmacd8

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.15 16:03:03