环境
ubuntu20.2
设置时区
当前系统时区
node@node1:~$ date -R
Fri, 17 Jun 2022 10:26:10 +0800
+0800
已经是东8区
tzselect
如果不是需要使用tzselect
node@node1:~$ tzselect
Please identify a location so that time zone rules can be set correctly.
Please select a continent, ocean, "coord", or "TZ".
1) Africa 5) Atlantic Ocean 9) Pacific Ocean
2) Americas 6) Australia 10) coord - I want to use geographical coordinates.
3) Antarctica 7) Europe 11) TZ - I want to specify the timezone using the Posix TZ format.
4) Asia 8) Indian Ocean
#?
...
先输入对应序号4(Asia) ,再先10(Beijing)
复制
sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
验证
date -R