Gnome World Clock Current Location: How to override?

I got the same issues as the above:
When I try to add World Clock to Gnome, I discover the Current Location is detected wrongly - but in the same TimeZone. And it does not match the TimeZone I have choose in Settings/Date & Time .

How can I override that?

F37 Workstation, all updated.

Maybe I’m wrong, but differently from such link, there is not “a default city”, I can add and remove what I want. And I don’t see a “Current Location”, maybe you mean “current timezone”.
Anyway, in Setting → Date & Time do you have Automatic Time Zone enabled?

Thanks for responding!

Please correct me if my terminlogy is incorrect.

I invoke “gnome-clock” by clicking the “Date/Time” at the middle of the top bar:

Then click “World Clocks”

image

Shenzhen is show as my “Current Location”, while I can add “Hong Kong” - which it shows it is my current timezone. The trash bin icon means it is I added manually, so that I can also remove it.


My timezone is manually set to HKT.

Interesting. I don’t have a “default city”, I can only add them manually (and hence delete them all). I’m on Silverblue BTW, I don’t know if it makes any difference.

1 Like

Just installed F37 SB in VM. Confirmed your finding - there is no Default Location for Gnome World-Clock under SilverBlue.

=== Update 1 below ===
After let SB37 idle for a while, it reported some updates are installed.

After reboot, run WorldClock again, it now asks for permission to access location

image

After granting access, nothing happens.

After running “sudo rpm-ostree update”, run WorldClock again, after granting Location access, “Current location” is added.

In compare with SB Rawhide “Fedora-Silverblue-ostree-x86_64-Rawhide-20230114.n.0” - after granting access, Current locaiton is added automatically.

1 Like

There are 2 potential points to look at.

  1. Do you have location services enabled? If so that might give the current location city based on the system IP seen externally.
  2. How is the system RTC configured? The output of timedatectl should show something like this with both RTC and Universal time set to UTC and the local time and your time zone set appropriately.
# timedatectl
               Local time: Sun 2023-01-15 18:08:30 CST
           Universal time: Mon 2023-01-16 00:08:30 UTC
                 RTC time: Mon 2023-01-16 00:08:29
                Time zone: America/Chicago (CST, -0600)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
  1. Yes
$ timedatectl
               Local time: Tue 2023-01-17 20:43:52 HKT
           Universal time: Tue 2023-01-17 12:43:52 UTC
                 RTC time: Tue 2023-01-17 12:43:51
                Time zone: Asia/Hong_Kong (HKT, +0800)
System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no
 

Since you have the location services enabled it probably got the “default city” clock entry that cannot be changed as a result of that service. The location services sees your location as the first actual world accessible IP address location and may not be accurate if your ISP routes the access through their private network for some distance before it actually reaches the internet.

I don’t use Gnome, but if I allow any website to select my location, it comes up with one in a city about 120 miles from my home and can’t be changed. I use ADSL, and from what I can tell from reverse DNS, my connection enters the Internet in that city, as my IP address resolves to a FQDN with that city’s name included. It’s possible that the OP’s IP does the same thing, and Gnome is using that to pick the location. If so, there’s not much you can do as long as location services are on. It would help to know if locations in a web browser are off in the same way or not, because if they aren’t, this isn’t the issue.

the above and this indicate the same thing

A web browser can only guess location based on the closest public IP it can identify. The first quote above indicates the same.

Essentially this would be the same result seen by a remote host running traceroute to follow your path back to you and that can only reveal the last public IP address in the chain traversed.

I believe the default is based on if you have Location Services enabled, in which case it attempts to use the Mozilla service. It should using things like wifi, IP address, etc., if you don’t have a more accurate sensor (ie, GPS). If I use my cell phone data, location services thinks I’m hundreds of miles away from where I actually am, for example, where my landline ISP is much closer. If you use a VPN, that may also factor into it.

You can try using MaxMind (the databases are in the Fedora repos if you’d rather do it locally than a web page) against your current WAN IP.

I believe Gnome ultimately uses GeoClue, so you can setup an alternative location service in /etc/geoclue/geoclue.conf (note that you might need to get a key and/or pay for some of them).

Which is roughly what I wrote, using my own experience as an example.

After shutting down my machine last night, after restart, the “Current Location” clock entry disappears in Clock. My Locaiton Service is still enabled.