[time and date] Searching for locations is slow and doesn't work offline

Bug #1455223 reported by Dustin Kirkland 
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
libtimezonemap (Ubuntu)
Confirmed
Undecided
Unassigned
unity-control-center (Ubuntu)
Fix Released
High
Lars Karlitski

Bug Description

Click on clock -> Time and Date settings -> Clock -> Choose Locations
-> Click the + -> Start typing "San Franc"

When I'm at home, on a 300mbps connections, it takes several seconds
to several minutes, when trying to add a new location.

When I'm on a plane without internet connectivity, (ie, exactly when I
most importantly need to change the time on my laptop to the new/next
timezone), it doesn't work at all.

Can we please, please, please move this timezone/location information
to a locally cached database?

Revision history for this message
Will Cooke (willcooke) wrote :

Renaming bug to state the issue in the title

summary: - Time and Date locations should be cached locally
+ [time and date] Searching for locations is slow and doesn't work offline
Revision history for this message
Iain Lane (laney) wrote :

FYI we have this information locally in libtimezonemap already and an algorithm specified for querying this for ubuntu-system-settings (https://wiki.ubuntu.com/TimeAndDate#Choosing_locations - scroll down a bit "Whenever").

I think it might make sense for libtimezonemap to implement this algorithm itself, then the three locations that need it that I know of (two in unity-control-center datetime, one in ubuntu-system-settings) could all call the same API.

Maybe there were good reasons for using the server (such as localised search?) that we don't know about atm. Would need to investigate.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libtimezonemap (Ubuntu):
status: New → Confirmed
Changed in unity-control-center (Ubuntu):
status: New → Confirmed
Revision history for this message
Matthew Paul Thomas (mpt) wrote :

When I designed this, I didn't know it was going to be implemented by accessing the Internet -- though I might have guessed by re-reading the equivalent part of the Ubuntu installer spec. <https://goo.gl/terpNZ> So, add ubiquity to the list of callsites for that API.

If I'd known it was going to access the Internet, I would have specified progress, error, and offline feedback.

So, why does it use the Internet? What are some concrete examples of places that people would expect to show up, that wouldn't show up, if we relied entirely on an offline list?

Revision history for this message
Sebastien Bacher (seb128) wrote :

The internet access makes sense in the ubiquity installer because you can assume the machine is not configured yet, that's not the case in settings so I think using the offline datas would be fine there

Revision history for this message
David Britton (dpb) wrote :

(not directly related to bug, but a workaround since the indicator is a bit buggy in vivid, and this bug seems to represent the problem well)

Thought others may be interested in this script:

#!/usr/bin/python3
import subprocess
import json

tz = [
    "America/Los_Angeles Los Angeles",
    "America/Denver Denver",
    "America/Sao_Paulo São_Paulo",
    "UTC UTC",
    "Europe/London London",
    "Asia/Kolkata India"
]

subprocess.check_call(
    ["gsettings", "set",
     "com.canonical.indicator.datetime",
     "locations", json.dumps(tz)])

Simply customize, run and it should fix up timezones for you.

Changed in unity-control-center (Ubuntu):
status: Confirmed → In Progress
importance: Undecided → High
assignee: nobody → Lars Uebernickel (larsu)
Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in unity-control-center (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.