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.


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


2 Answers 2


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.

  • Note that /etc/rc.local won't work for running the script automatically, since at that stage the newtork may not yet be available. Apr 14, 2016 at 17:58

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.