sudo apt install tzdata
进行安装时区,有很多时区可供选择。
然后执行:tzselect
root@d75c94dcd226:/# date
2023年 10月 11日 星期三 06:25:12 UTC
root@d75c94dcd226:/# tzselect
Please identify a location so that time zone rules can be set correctly.
Please select a continent, ocean, "coord", or "TZ".
1) Africa
2) Americas
3) Antarctica
4) Asia
5) Atlantic Ocean
6) Australia
7) Europe
8) Indian Ocean
9) Pacific Ocean
10) coord - I want to use geographical coordinates.
11) TZ - I want to specify the timezone using the Posix TZ format.
#? 4
Please select a country whose clocks agree with yours.
1) Afgh
Linux时区设置教程:tzselect与Asia/Shanghai配置,

本文介绍了如何在Linux系统中使用`sudoaptinstalltzdata`安装时区数据,通过tzselect选择并永久设置Asia/Shanghai时区,以确保日期和时间的正确显示。
最低0.47元/天 解锁文章
708

被折叠的 条评论
为什么被折叠?



