After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 88754 - clock applet should support changing timezones
clock applet should support changing timezones
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: clock
2.11.x
Other All
: Normal enhancement
: ---
Assigned To: Panel Maintainers
Panel Maintainers
: 119304 152096 166886 336443 358515 399690 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2002-07-22 01:49 UTC by Johan (not receiving bugmail) Dahlin
Modified: 2015-03-24 13:01 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
v1: first take (6.44 KB, patch)
2002-07-22 01:50 UTC, Johan (not receiving bugmail) Dahlin
needs-work Details | Review
v2: set the value in display_properties_dialog (6.92 KB, patch)
2002-07-22 02:17 UTC, Johan (not receiving bugmail) Dahlin
needs-work Details | Review
patch (28.41 KB, patch)
2003-10-13 16:09 UTC, Mark McLoughlin
needs-work Details | Review
timezone patch with graphical timezone selection (110.25 KB, patch)
2004-02-26 16:25 UTC, Erwann Chenede
none Details | Review
image for the graphical selection (108.97 KB, image/png)
2004-02-26 16:26 UTC, Erwann Chenede
  Details
timezone patch (133.50 KB, patch)
2005-05-25 03:18 UTC, Glynn Foster
none Details | Review
Latest generation patch to apply to 2.14.x sources (143.88 KB, patch)
2006-06-13 02:27 UTC, Glynn Foster
none Details | Review
another update (140.49 KB, patch)
2006-12-04 03:56 UTC, Matthias Clasen
none Details | Review
Updated to trunk (but crashes) (134.54 KB, patch)
2007-05-13 22:03 UTC, Vincent Untz
none Details | Review
gnome-panel-2.18.1-intl.patch (142.62 KB, patch)
2007-06-24 16:02 UTC, Nicolas Boichat
none Details | Review
gnome-panel-trunk.patch (139.65 KB, patch)
2007-06-24 19:49 UTC, Nicolas Boichat
needs-work Details | Review
Non-complete patch (162.95 KB, patch)
2007-07-03 00:44 UTC, Vincent Untz
none Details | Review
Feature-complete patch (171.20 KB, patch)
2007-07-03 23:03 UTC, Vincent Untz
none Details | Review

Description Johan (not receiving bugmail) Dahlin 2002-07-22 01:49:20 UTC
It's sometimes useful to be able to adjust the hours in the clock applet,
eg if you want to know what time it is in another time zone.
Comment 1 Johan (not receiving bugmail) Dahlin 2002-07-22 01:50:31 UTC
Created attachment 9998 [details] [review]
v1: first take
Comment 2 Johan (not receiving bugmail) Dahlin 2002-07-22 02:17:27 UTC
Created attachment 9999 [details] [review]
v2: set the value in display_properties_dialog
Comment 3 Mark McLoughlin 2002-07-22 02:34:26 UTC
I think it would make more sense to have a timezone selector ...

A spin button labelled 'Offset' isn't exactly telling the user much ... 
Comment 4 Luis Villa 2002-07-25 18:06:50 UTC
Any thoughts on this UI, usability-maint? I tend to agree with Mark
that it just isn't quite right...
Comment 5 Johan (not receiving bugmail) Dahlin 2002-07-25 19:27:02 UTC
I agree with Mark too. It would be better with a timezone selector.
I tried to fixed it a few days ago but i couldn't find any decent data.
Similiar to that one find in the timezone selector in Windows.

Comment 6 Dave Bordoley [Not Reading Bug Mail] 2002-07-25 19:39:02 UTC
I think a time zone selector is much better personally, but isn´t 
this a system thing, more of a setup tools issue. i remember a while 
ago requesting functionality in the clock to set the system time, 
theres an open bug as well.
Comment 7 Mark McLoughlin 2002-08-11 12:18:43 UTC
Yeah, I'm not sure whether it makes sense for the clock to have a
different timezone than the system time.
Comment 8 Johan (not receiving bugmail) Dahlin 2002-08-11 12:38:34 UTC
Well, if you're often travelling or just need to keep track of the
time of another time zone.
But it guess it's not a feature that will be used so commonly.
Comment 9 Mark McLoughlin 2002-08-11 12:42:19 UTC
Glynn: This is basically the timezone selector applet thing you were
working on when you went to aussieland right ?
Comment 10 Glynn Foster 2002-08-11 22:01:24 UTC
yeah, I was working on something..but I've had zero time to follow it
up since then and the code I had isn't very useful right now ;)
Comment 11 Vincent Untz 2002-11-07 00:08:36 UTC
Has anything be decided on this ?
gworldclock may be a useful app here.
Comment 12 Darren J Moffat 2003-05-01 00:04:42 UTC
This is a very useful functionality for people who work with colleagues
who are in different timezones, or have family and friends in a far
way timezone.

With CDE and GNOME 1.x I had 3 clocks in my "panel", one for
the Europe/London, one for Australia/Adelaide and one for US/Pacific.
This was done by running xclock (yes the MIT xclock) and setting $TZ
in the xclock environment.

Note that an offset doesn't work since it doesn't take into account
daylight savings and it assumes you acutally remember the offset to
the alternate zone.

As for a User interface I would like to see the following:
* The ability to enter into a text box a POSIX timezone.
* At some later time a GUI selector similar to what is in evolution
  could be added.
* Removal of the gimicy UNIX time and Internet time to an advanced
  config area (or removed totally).
* Display of the timezone name (configurable, just like seconds/date).


Comment 13 Glynn Foster 2003-05-01 00:33:50 UTC
Ghee Teo [Sun] has been working on an applet, but hasn't had time to
finish it. From what I saw last time it looked really sweet. Hopefully
he'll be able to get it in for GNOME 2.4.
Comment 14 Calum Benson 2003-05-07 12:21:40 UTC
cc'ing Matt, as he's taking over on the world clock work Ghee was
doing, and the suggested feature list might be of interest (although
it already does most of them IIRC)
Comment 15 Vincent Untz 2003-09-04 10:26:31 UTC
*** Bug 119304 has been marked as a duplicate of this bug. ***
Comment 16 Vincent Untz 2003-10-13 15:42:33 UTC
The clock applet has an "Adjust Time & Date" thing that launches a
user specified thing or time-admin (from g-s-t). In time-admin, we can
set the timezone. Is this enough or do we want to support changing the
timezone while not being root ?
Comment 17 Mark McLoughlin 2003-10-13 16:08:19 UTC
Yeah, I think we do want this - it can be quite useful to have a
second clock showing a different timezone ...

In our (Sun's) Java Desktop System release we have a patch to do this
but it requires a *lot* of cleanup before it can go back into head.
I'll attach it here for anyone who's interested in re-writing it ...
Comment 18 Mark McLoughlin 2003-10-13 16:09:25 UTC
Created attachment 20678 [details] [review]
patch
Comment 19 Calum Benson 2003-10-13 16:40:09 UTC
Note incidentally that this patch implements nothing like the UI we
actually designed for it  :)  I'll be happy to describe that here
later on when I've got a minute, if it's going to be useful...
Comment 20 Calum Benson 2003-11-28 12:25:46 UTC
Erwann has completely rewritten this patch for JDS recently...
could/should we attach it here...?
Comment 21 Vincent Untz 2003-11-28 14:48:58 UTC
Calum: yes, please attach the patch if possible.
Comment 22 Calum Benson 2003-12-03 13:21:10 UTC
I was really asking the Sun guys, I don't know if it's a patch we want
to keep to ourselves for a while or not :)
Comment 23 Erwann Chenede 2004-02-26 16:25:19 UTC
Created attachment 24812 [details] [review]
timezone patch with graphical timezone selection
Comment 24 Erwann Chenede 2004-02-26 16:26:07 UTC
Created attachment 24813 [details]
image for the graphical selection
Comment 25 Erwann Chenede 2004-02-26 16:29:10 UTC
I've attached what will be in the next release of Sun's gnome version.
This patch allow the user to graphically select the timezone the applet
will display. It also allow to display the main city in the selected
timezone alongside the time and date in the applet.

Let me know what you think of the patch.
Comment 26 Erwann Chenede 2004-02-26 16:30:25 UTC
I forgot. you need to add the attached image in the applets/clock
directory to properly compile the clock applet.
Comment 27 Scott Taylor 2004-04-12 18:52:13 UTC
With or without the graphical selection, it would be nice if there was a checkbox
that would allow the timezone to be shown beside the time too. I'd like to *see*
that the 18:51 on my screen really is UTC (or whichever)...
Comment 28 Olav Vitters 2004-09-07 20:29:02 UTC
*** Bug 152096 has been marked as a duplicate of this bug. ***
Comment 29 Christian Neumair 2004-10-18 16:20:41 UTC
Shouldn't be an issue now that we have GNOME System Tools/time-admin integration
for the clock applet.

regs,
 Chris
Comment 30 Vincent Untz 2004-10-18 17:33:13 UTC
From comment #17:
Yeah, I think we do want this - it can be quite useful to have a
second clock showing a different timezone ...

Reopening the bug.
Comment 31 Glynn Foster 2005-05-25 03:18:52 UTC
Created attachment 46854 [details] [review]
timezone patch

Here's an updated patch that builds against 2.10.1. It still uses the same
timezone image that Erwann attached previously.

It probably needs a bit of work to clean up the interface, but I find it quite
useful.
Comment 32 Glynn Foster 2005-05-25 03:23:32 UTC
Basically the interface to this looks like -

[clock image]   Wednesday May 25, 3:20PM

clicking on the clock image brings up a menu

[List of different time zones]
==============================
Edit time zones...

The list of time zones looks like -

Auckland               Wed May 25, 3:21PM
Dublin                 Wed May 25, 4:21AM
Los Angeles            Tue May 24, 8:21PM
Sydney                 Wed May 25, 1:21PM
Paris                  Wed May 25, 5:22AM

[none are selectable - perhaps that's something we could do, selecting them
changes the display on the main applet]

Clicking on Edit Time Zones... gives a dialog with a map and various locations.
You can click on different locations and add to the list, or remove existing ones.
Comment 33 Teppo Turtiainen 2005-07-11 15:55:36 UTC
*** Bug 166886 has been marked as a duplicate of this bug. ***
Comment 34 Olav Vitters 2006-04-01 18:44:10 UTC
*** Bug 336443 has been marked as a duplicate of this bug. ***
Comment 35 Reed Hedges 2006-05-10 22:58:31 UTC
I agree that you should be able to select an alternate timezone without needing the admin password and have the full time tool. Just a menu of timezones listed (with numerical offsets mentioned), plus an option to use the system's default, would be good.

The clock should display the timezone next to the time IF you are using an alternate timezone (rather than selecting the system default) OR specifically request it with a checkbox in the preferences.   
Comment 36 Reed Hedges 2006-05-10 23:02:33 UTC
One major caveat: it might be better if this "user's custom timezone" was available for other Gnome apps too, like the calendar.  I.e. if you set the timezone in the clock applet, but assume that the rest of Gnome also uses that time displayed in the applet (perhaps you even forget that you customized the clock applet in this way), you might get in trouble.

Sometimes the simplest things have kind of large impacts on user assumptions etc... :)
Comment 37 Glynn Foster 2006-06-13 02:27:00 UTC
Created attachment 67227 [details] [review]
Latest generation patch to apply to 2.14.x sources

Again as Mark commented earlier, this patch may need some cleanup before it gets committed to head, but I'd personally like to see this type of functionality in GNOME 2.16
Comment 38 Glynn Foster 2006-06-13 02:28:41 UTC
[Thanks are due to Erwann who actually sat down and ported the patch to the latest sources - he gets credit, though may not have the time with his commitments to work on the patch further]
Comment 39 Matthias Clasen 2006-12-04 03:56:38 UTC
Created attachment 77614 [details] [review]
another update
Comment 40 Matthias Clasen 2006-12-04 04:02:03 UTC
Here is another update of the patch. This one applies to 2.16.x.
It has some additional fixes and cleanups over the earlier versions.

- the two calendar popups are now mutually exclusive
- I've decided to use an arrow instead of an icon. This uses less
  panel space, and avoids icon sizing complications.
- popup positioning glitches have been fixed
- a bug in the initial visibility of the timezone button has been fixed
- the timezone button has a tooltip
Comment 41 Vincent Untz 2007-01-04 14:31:00 UTC
*** Bug 358515 has been marked as a duplicate of this bug. ***
Comment 42 Matthias Clasen 2007-02-07 15:37:11 UTC
Vincent, any word on this ? I think this would add real value to the panel clock for many people.
Comment 43 Vincent Untz 2007-02-08 13:41:34 UTC
(In reply to comment #42)
> Vincent, any word on this ? I think this would add real value to the panel
> clock for many people.

I definitely want this to go in.

I didn't look at the latest versions of the patch, but I'm wondering if having the timezones in a menu instead of a popup would be better. We might also want to kill the "Use UTC" pref.
Comment 44 Erik Volkman 2007-03-26 04:12:56 UTC
This is something I would have found incredibly useful while on a study abroad program last semester. I was disappointed when I figured out that I couldn't have one clock with my local time and one with my "native" time zone (so I'd know not to try calling home when it was 3am).
Comment 45 Vincent Untz 2007-05-02 12:19:54 UTC
*** Bug 399690 has been marked as a duplicate of this bug. ***
Comment 46 Vincent Untz 2007-05-13 22:03:22 UTC
Created attachment 88135 [details] [review]
Updated to trunk (but crashes)

I quickly tried updating the patch to trunk, but it crashes in lots of interesting ways. It might be better to start again from the previous patch...
Comment 47 Nicolas Boichat 2007-06-24 16:02:14 UTC
Created attachment 90561 [details] [review]
gnome-panel-2.18.1-intl.patch

Ported to 2.18.1
Comment 48 Nicolas Boichat 2007-06-24 19:49:22 UTC
Created attachment 90579 [details] [review]
gnome-panel-trunk.patch

I tried to port the patch to the trunk, it seems it works, but it probably need a bit more testing.
Comment 49 Vincent Untz 2007-06-25 12:15:54 UTC
Thanks for the update, Nicolas!

I didn't have time to look at the whole code, but it can be improved in some ways.

In change_clock_orientation(), we use a HBox and a VBox. I'd prefer to use obox.c from the notification area which is handling this situation in a better way.

I'm not fan of having to make ClockData "public". It'd be better if it's possible to keep the structure private, but I didn't check how it was used in new files.

Having a script to synchronize the e-map code from evolution would be useful too. For libegg, we used to have a update-from-egg.sh which was doing this.
Comment 50 Vincent Untz 2007-07-01 17:22:02 UTC
It's really not possible to commit the patch in this state: the code is far from being clean. I'll work on improving it.
Comment 51 Vincent Untz 2007-07-03 00:44:10 UTC
Created attachment 91069 [details] [review]
Non-complete patch

Here's a nearly totally rewritten patch.

It's useless right now, since there are some missing parts (adding/removing/editing a timezone) and some TODO.

I'm attaching it now because it'd be a shame to lose the work that has been done so far.
Comment 52 Vincent Untz 2007-07-03 23:03:12 UTC
Created attachment 91146 [details] [review]
Feature-complete patch

With this patch, everything is working. It's a bit crashy in some known cases (documented by some TODO in the code).

Also, it probably needs some UI love.

Oh, also the gconf schema needs an update.
Comment 53 Vincent Untz 2007-07-05 00:21:16 UTC
I've nearly finished my patch and committed it. There are still some TODO items, but it's working now. At least for me :-)

I really don't know if this will work on Solaris/BSD/etc. since the part to detect timezones has not been tested on those. Tests welcome for this.

(I've opened bug 453827 to track the remaining things to do)