ors*_*iro 6 time networking internet timezone
我的默认位置是 GMT+1。我希望 Ubuntu 根据我连接的互联网连接的时区自动更改我的默认时区。
例子:
当我在葡萄牙并连接到互联网时,我希望 Ubuntu 将我的时区设置从 GMT+1 更改为 GMT+0。
此外,我确保设置了以下设置,但它们不会更改我的时区:
GitHub 中有一个脚本来检测和更新当前时区,使用来自您 IP 地址的地理定位:https : //github.com/cdown/tzupdate
安装 python 和 python-pip 后,脚本可以安装为:
pip install -U tzupdate
Run Code Online (Sandbox Code Playgroud)
并运行为
sudo ~/.local/bin/tzupdate
Run Code Online (Sandbox Code Playgroud)
这个命令可以在启动时以某种方式自动运行。