Comment 3 for bug 735445

Revision history for this message
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.