GNOME Bugzilla – Bug 541145
Support UTC as additional location
Last modified: 2009-08-26 12:59:29 UTC
The clock applet can display times from various timezones now, but currently it doesn't support the quite essential Universal Coordinated Time. UTC is useful for instance for coordinating team meetings.
Created attachment 113817 [details] [review] [PATCH] Support UTC timezone as special location. Fixes bug #541145. * applets/clock/clock-zonetable.c (clock_zonetable_add(), clock_zonetable_load_zonetab()): Add hard-coded UTC zone info. * applets/clock/clock.c (fill_location_tree): Add hard-coded UTC GWeather location to location tree model. --- ChangeLog | 10 ++++++++++ applets/clock/clock-zonetable.c | 28 +++++++++++++++++++--------- applets/clock/clock.c | 12 ++++++++++++ 3 files changed, 41 insertions(+), 9 deletions(-)
Created attachment 113818 [details] [review] [PATCH] Support UTC timezone as special location. Fixes bug #541145. * applets/clock/clock-zonetable.c (clock_zonetable_add(), clock_zonetable_load_zonetab()): Add hard-coded UTC zone info. * applets/clock/clock.c (fill_location_tree): Add hard-coded UTC GWeather location to location tree model. --- ChangeLog | 10 ++++++++++ applets/clock/clock-zonetable.c | 27 ++++++++++++++++++--------- applets/clock/clock.c | 12 ++++++++++++ 3 files changed, 40 insertions(+), 9 deletions(-)
Looks similar to Bug 521096
*** Bug 521096 has been marked as a duplicate of this bug. ***
Created attachment 115607 [details] [review] UTC timezone in the clock without ChangeLog and working in search list I confirm Mathias' patch is working. It adds an UTC timezone to the clock. But I made a few changes: * removed ChangeLog changes to apply on previous version (mine is 2.22.2, ubuntu hardy) * changed the name in the search list to "UTC (Universal Coordinated Time)" because otherwise it isn't found when you type "UTC" in the search input * changed the timezone from GMT to UTC in the search entry (otherwise nothing is added when you select it, probably because there's no GMT timezone)
Dan is reworking the UI to add timezone and this will break the patch here. Dan, can you take a look at this?
Bug 521096 is similar to this bug only if it refers to the option to display UTC regardless of the local system's current time zone, and without requiring the system's time zone to be changed. As noted over on the Launchpad bug system at https://bugs.launchpad.net/gnome-panel/+bug/204654 comment 6, the heart of the problem is that the clock applet used to have this feature, and this now-missing feature remains documented in the applet's self-help system.
I can confirm this bug, 2.26.0 still doesn't support UTC beside my local timezone. BTW, note that it is also kind of irritating that the clock applet still displays "GMT+x" instead of "UTC+x" within time zone descriptions. While this is common speak I learned GMT means UTC in technical context, so maybe Gnome should drop GMT and be more precise on that one. http://en.wikipedia.org/wiki/Utc http://en.wikipedia.org/wiki/Greenwich_Mean_Time
(In reply to comment #8) > BTW, note that it is also kind of irritating that the clock applet still > displays "GMT+x" instead of "UTC+x" within time zone descriptions. While this > is common speak I learned GMT means UTC in technical context, so maybe Gnome > should drop GMT and be more precise on that one. The clock's goal is to tell people what time it is, not to be technically precise. Most ordinary people don't know what "UTC" means, so saying that instead of GMT would just be confusing.
Those ordinary people also don't know what GMT means, isn't that why you give us the opportunity to select countries and cities instead of fuzzing around with UTC settings directly?
*** Bug 583224 has been marked as a duplicate of this bug. ***
I was just about to file a bug about this too, but then found this one. Hm, I don't think I've ever heard of at least two thirds of the places and time zones in the list. Despite that, I'm apparently not the only one who thinks it is silly to have to open a terminal and type "date --utc" in order to find out when the GNOME board elections end.
Some of you might think that some people don't use UTC, but we radio hams use it 24/7. As I am on my ham radio machine right now, what more need I say? I went to Linux primarily so I could get radio software, not to mention some unspeakable issues with that publisher in the north-western U.S.A.
Created attachment 140504 [details] [review] [libgweather] Add the UTC timezone in the timezone menu
Created attachment 140505 [details] [review] [libgweather] Add gweather_timezone_get_utc() to get the UTC timezone
Those two patches update libgweather to provide the UTC timezone in the timezone menu. Dan, I'd love if you could take a look and tell me if it makes sense.
*** Bug 587731 has been marked as a duplicate of this bug. ***
You don't need to call parse_tzdata for UTC; it's UTC. You know a priori that its offset is 0 and it doesn't do DST. Also, libgweather currently refers to "GMT", "GMT+5", etc, so it's inconsistent to call it "UTC" here. And saying "Coordinated Universal Time" is twice as bad as saying "UTC". I'm going to patch it to be the "GNU Network Object Model Environment Clock" if you do that. :-) There are some acronyms that are better off left unexpanded. I'd say change its name to "Greenwich Mean Time", so it will then end up in the menu as "Greenwich Mean Time <small>(GMT)</small>". Oh, and put a separator line before it. I know there are some people who think the world will end if we say "GMT" instead of "UTC", but they're already pissed off that we say "gigabyte" instead of "gibibyte" anyway, so we won't actually be annoying anyone who isn't already annoyed, and it will be less confusing for ordinary users. But anyway, other than the not-calling parse_tzdata thing, feel free to commit it however you want it.
So people searching for "UTC" won't be able to find it? Google gets 1 search for "UTC" for every 3 searches for "GMT".
(In reply to comment #18) > You don't need to call parse_tzdata for UTC; it's UTC. You know a priori that > its offset is 0 and it doesn't do DST. I guess I was trying to handle the case where the world would completely change, you know ;-) > Also, libgweather currently refers to "GMT", "GMT+5", etc, so it's inconsistent > to call it "UTC" here. And saying "Coordinated Universal Time" is twice as bad > as saying "UTC". I'm going to patch it to be the "GNU Network Object Model > Environment Clock" if you do that. :-) There are some acronyms that are better > off left unexpanded. > > I'd say change its name to "Greenwich Mean Time", so it will then end up in the > menu as "Greenwich Mean Time <small>(GMT)</small>". Oh, and put a separator > line before it. I'm not sure it's worth adding a separator between Unknown and GMT, since there's already one just after -- just tested, and I find it ugly with two separators. I'm perfectly fine with renaming to GMT in the UI. Do you want to rename the API too? I'm wondering because I'd expect programmers to use UTC, but then, consistency... Hrm. I'll got to bed first, I guess :-)
(In reply to comment #20) > I'm not sure it's worth adding a separator between Unknown and GMT, since > there's already one just after -- just tested, and I find it ugly with two > separators. Oh, oops, I didn't look that carefully. I thought you were adding it at the bottom. > I'm perfectly fine with renaming to GMT in the UI. Do you want to rename the > API too? I'm wondering because I'd expect programmers to use UTC, but then, > consistency... Yeah... I agree with both sides of your argument. :)
I went with utc in the name of the API. In case somebody complains, we can add a define later, but I think it makes more sense this way.
(In reply to comment #5) > * changed the name in the search list to "UTC (Universal Coordinated Time)" UTC stands for “Coordinated Universal Time” in English (and “Temps Universel Coordonné” in French).
*** Bug 593051 has been marked as a duplicate of this bug. ***