运行以下命令:
sudo cp /usr/share/zoneinfo/America/Los_Angeles /etc/localtime我当地的时间改到了PST。现在我跑了:
sudo cp /usr/share/zoneinfo/Asia/Kolkata /etc/localtime但我的系统时间并没有变回IST。相反,它显示了PST使用IST标签的时间。

(图片:我指的是加尔各答,但突出显示的时区是洛杉矶。这也许能解释我的问题。)
我希望亚洲/加尔各答恢复正常。
P.S.:用命令
sudo timedatectl set-timezone Asia/Kolkata时区随PST时间的变化而改变为IST。
发布于 2019-12-26 11:22:50
卸载和重新安装tzdata解决了我的问题:
sudo apt-get remove tzdata
sudo apt-get install tzdata发布于 2019-12-26 09:33:41
这不是改变命令行中时区的正确方法。
sudo apt install ntpdate
sudo ntpdate -s ntp.ubuntu.com
sudo dpkg-reconfigure tzdata
从菜单中选择正确的时区。
下次如果您想从命令行设置您的时区:
timedatectl set-timezone [Region]/[City]
发布于 2019-12-26 09:44:00
这将把时区定在亚洲/加尔各答。timedatectl管理系统的时间设置。
sudo timedatectl set-timezone Asia/Kolkata若要查看输入的可用时区列表,
timedatectl list-timezones编辑:我知道你的系统S/W的时间是混乱的。在这种情况下,使用硬件时钟通过使用下面的命令来设置系统时间。
sudo hwclock --hctosyshttps://askubuntu.com/questions/1198629
复制相似问题