40

[Running Ubuntu Gnome 15.10]

I recently brought my computer from PST to EST in North America. Once in EST my laptop did not update the timezone. I tried toggling the "Auto Time Zone" switch which had no effect. Finally, I rebooted the machine which also didn't have an effect.

Running /usr/lib/geoclue-2.0/demos/where-am-i doesn't return any result.

EDIT [Now on Ubuntu 24.04]: This seems to be broken again, all the past solutions below no longer fix the issue, running the where-am-i geoclue demo now results in an error:

** (where-am-i:68936): CRITICAL **: 10:27:32.351: Failed to connect to GeoClue2 service: Timeout was reached
labarna
  • 2,632
  • Try this tutorial. I think this is just what you are looking for. – Alex Lowe Jan 27 '16 at 21:06
  • 4
    Thanks Alex, that tutorial is 8 years old at this point, and dates back to when Ubuntu was still using Gnome 2.x. The issue I'm having isn't with ntp which is installed and functioning. It's that my computer cannot figure out where it is, via the geoclue system. That's what changes the timezone. The "time" is accurate, but just the wrong timezone. – labarna Jan 28 '16 at 14:43
  • 1
    I have the same problem in Ubuntu 22.04. I set both auto timezone and Location Services on. And if it is a network/geoclue problem, I have geoclue installed, but I don't even see /usr/lib/geoclue-2.0/demos/where-am-i any more in Ubuntu 22.04. – nealmcb Nov 30 '24 at 15:31
  • None of the suggestions and answers posted here so far has fixed the issue in my laptop. Have you got it fixed, @labarna? Any workaround? – Luciano Feb 10 '25 at 14:07

2 Answers2

101

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

glortho
  • 1,111
  • 2
    This is actually the key to solving the issue. – Tristan Tarrant May 24 '18 at 08:49
  • 11
    Does it default to "off" or did I manually change that? It's weird that the "Automatic Time Zone" feature just silently fails without warning or explanation. – Michael Martin-Smucker Jul 09 '18 at 15:51
  • 2
    @MichaelMartin-Smucker yeah... they really should warn, or prompt you to enable/re-enable Location Services – triunenature Sep 10 '18 at 05:10
  • 1
    need Settings>Date&Time> Automatically Date & Time and Timezone on. As well as privacy location settings on. – Amos Folarin Oct 11 '18 at 03:58
  • 10
    So the bug, it seems, is with the Date and Time interface. A user shouldn't be able switch a dependant (child) feature "on" that cannot function without Location Services: in my opinion, switching Automatic Timezone to on should first check if Location Services are on and then redirect the user accordingly. – GrayedFox Mar 04 '19 at 09:23
  • @GrayedFox: agree. Have you filed a bug? – Dan Dascalescu Mar 17 '19 at 06:17
  • 1
    I think this is the most relevant open bug – Robin Winslow May 13 '19 at 09:34
  • 1
    I remember this helped in the past a couple of times; but it makes no effect anymore. Switched off&on several times either "Location Services", "Automatic Time Zone" and "Automatic Date & Time", but none helped triggering a refresh; without manual fixes Ubuntu stays stuck to my previous time-zone. – Kamafeather Apr 23 '24 at 12:29
  • 2
    This no longer seems to work in Ubuntu 24.04... running the geoclue where-am-i demo results in a error:
    ** (where-am-i:68936): CRITICAL **: 10:27:32.351: Failed to connect to GeoClue2 service: Timeout was reached
    
    – labarna Dec 02 '24 at 14:27
8

I seem to have fixed this issue by installing gnome-clocks which might serve as the hook gnome-shell uses to get the location data for the time-zone.

labarna
  • 2,632