clock doesn't update on timezone change

Bug #735445 reported by Kalman Reti on 2011-03-15
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Indicator Date and Time
Fix Released
indicator-datetime (Ubuntu)
Michael Terry

Bug Description

Binary package hint: indicator-datetime

I booted the natty 3/12/2011 daily build amd64 desktop image, which starts up in GMT. I used the "Time & Date Settings..." entry of the clock's menu to change to EDT. The time in the dialog for that setting promptly changed, but the time in the clock didn't, i.e. it is still display 12:00 PM when it is really 8:00 AM (as the date command in a terminal window demonstrates).

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: indicator-datetime 0.1.96-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-6.34-generic 2.6.38-rc7
Uname: Linux 2.6.38-6-generic x86_64
Architecture: amd64
Date: Tue Mar 15 08:44:06 2011
LiveMediaBuild: Ubuntu 11.04 "Natty Narwhal" - Alpha amd64 (20110312)
SourcePackage: indicator-datetime
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Kalman Reti (kalman-reti) wrote :
Changed in indicator-datetime (Ubuntu):
status: New → Confirmed
Michael Terry (mterry) wrote :

Ted, it would be nice if the indicator service had a dbus method to force a time update (i.e. a method that then just emitted the UpdateTime signal). The dialog knows when it should be updated, so it could easily ask the service to update as well.

Michael Terry (mterry) on 2011-03-24
Changed in indicator-datetime (Ubuntu):
assignee: nobody → Michael Terry (mterry)
status: Confirmed → In Progress
Michael Terry (mterry) wrote :

OK, you'll love this one. So we don't actually need a new dbus method. The service already notices when /etc/localtime gets changed and emits the signal. But it wasn't taking effect in the indicator.

For some reason, g_time_zone_new_local() was always returning the same timezone. Looking at the glib code, it caches ref-counted timezones in an internal hash table, removing them from the table when a timezone object's last reference is removed. So asking for the local timezone (with identifier NULL) added a NULL entry in the table that persisted as long as the timezone object would exist.

And that's what was happening here. Some timezone object was lasting longer than it should, meaning we kept getting it when we asked for the local timezone, even after it had changed.

So I found the leak, plugged it, and now the clock updates. Goofy! Branch attached, and it's a nice one line fix that I would normally think is unrelated.

Changed in indicator-datetime (Ubuntu):
importance: Undecided → Low
Changed in indicator-datetime:
importance: Undecided → Low
status: New → In Progress
Ted Gould (ted) on 2011-03-29
Changed in indicator-datetime:
status: In Progress → Fix Committed
milestone: none → 0.2.1
Ted Gould (ted) on 2011-03-31
Changed in indicator-datetime:
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-datetime - 0.2.1-0ubuntu1

indicator-datetime (0.2.1-0ubuntu1) natty; urgency=low

  * New upstream release.
    * indicator-datetime-preferences crashed with SIGSEGV in
      g_utf8_normalize() (LP: #727089)
    * Uninstalling Evolution removes calendar from clock applet (LP: #691953)
    * clock doesn't update on timezone change (LP: #735445)
    * Cannot change main location (LP: #729029)
    * indicator-datetime-preferences crashed with SIGSEGV in
      g_simple_async_result_complete() (LP: #734951)
    * Time zone map looks identical when sensitive vs. insensitive (LP: #740846)
    * "Locations" window behaves like a modal dialog (LP: #740924)
    * Added location for clock menu isn't used or remembered (LP: #740930)
    * Time not displayed for added location in "Locations" window (LP: #740931)
    * "UTC" location can be removed but not re-added (LP: #740938)
    * "Locations" window bottom bar is missing a border (LP: #740941)
    * Add and Remove buttons in "Locations" window have unnecessary tooltips
      (LP: #740944)
    * No separator between "Add Event" and locations (LP: #740971)
    * indicator-datetime-preferences crashed with SIGSEGV in
      g_atomic_int_exchange_and_add() (LP: #740978)
    * inicator-datetime dosen't show corretly the time when changing from 24
      hours format to 12 hours (LP: #743394)
    * Add tooltips on the error icons
    * Fix marking to refresh as the calendar changes
    * Recycle old entries to make the refresh cleaner
    * Use day when timezone is set to 'locale'
    * Reset time when coming back from suspend (LP: #726053)
 -- Ted Gould <email address hidden> Thu, 31 Mar 2011 14:32:40 -0500

Changed in indicator-datetime (Ubuntu):
status: In Progress → Fix Released
Matthew Paul Thomas (mpt) wrote :

The same symptoms recurred in Ubuntu 13.10, now reported as bug 1271484.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers