6

My default location is GMT+1. I would like Ubuntu to automatically change my default timezone based on the timezone of my connected internet connection.

Example:

When I am in Portugal, and connected to an internet connection, I want Ubuntu to change my timezone setting from GMT+1 to GMT+0.

Moreover, I ensured that the following settings are set but they do not make my timezone change:

enter image description here

enter image description here

orschiro
  • 13,687

3 Answers3

5

There is a script in GitHub to detect and update the current time zone, using geolocation from your IP address: https://github.com/cdown/tzupdate

Once python and python-pip are installed, the script can be installed as:

pip install -U tzupdate

And run as

sudo ~/.local/bin/tzupdate

This command could be somehow automatically run on startup.

3

For Ubuntu 18.04 make sure Settings -> Privacy -> Location Services is set to "On."

Solution provide by glortho Auto Timezone doesn't update

It automatically works right away.

3

For Ubuntu 20.04 you can run the command as current logged-in user ( running as root doesn't change your current user timezone setting )

gsettings set org.gnome.system.location enabled true
gsettings set org.gnome.desktop.datetime automatic-timezone true
Debo
  • 31