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 154085 - add date and time capplet
add date and time capplet
Status: RESOLVED OBSOLETE
Product: gnome-control-center
Classification: Core
Component: Other Preferences
2.11.x
Other Linux
: Normal enhancement
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
: 532917 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-09-29 18:50 UTC by William Jon McCann
Modified: 2010-09-23 13:08 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
tarball of initial release (152.89 KB, application/x-compressed-tar)
2004-09-30 18:10 UTC, William Jon McCann
  Details
patch to enable build (2.17 KB, patch)
2004-09-30 18:11 UTC, William Jon McCann
none Details | Review
updated gnome-date-time.tar.gz (154.44 KB, application/x-compressed-tar)
2005-02-17 20:46 UTC, William Jon McCann
  Details

Description William Jon McCann 2004-09-29 18:50:36 UTC
I think there should be a date and time (and timezone) configuration capplet.

 1. UI must run as the user and not require privilege
 2. should not store date, time, or timezone state but take them directly from
the system so that command line tools will still work correctly
 3. must notify the system of date and timezone changes
 4. should allow the distro/vendor/sysadmin to use their own authentication system
 5. must be written in C (particularly the backends possibly running at higher
privilege)
 6. must provide a mechanism for the distro/vendor/sysadmin to lock down ability
to change settings
 7. must support multiple platforms
 8. should not hard code vendor version capabilities

The date configuration in gnome-system-tools and system-config-date in Fedora
fail on many of these points.  So, I decided to start from scratch - kinda.

The design is as follows.  A capplet written in C that acts as a shell for
GObjects gnome-date-selection and gnome-timezone-selection (modified versions of
gnome-date-edit and e-timezone-dialog).  The shell populates the timezone by
calling supplied program, gnome-timezone, synchronously.  The date is obtained
from localtime.

The gnome-timezone-selection uses libical (via e-d-s/libecal) internally to get
timezone information.  The interface uses Olson timezone locations for
getting/setting.  The interface for gnome-date-selection uses GTime.

To set the timezone the shell checks if the timezone is locked down and if not
runs asynchronously: 
GCONFKEY_AUTH_CMD GCONFKEY_TIMEZONE_SET_CMD "timezone"

Where, GCONFKEY_AUTH_CMD is an optional authentication mechanism, such as a
graphical sudo/su.  GCONFKEY_TIMEZONE_SET_CMD is the command to use to set the
timezone, and defaults to gnome-timezone.  A distro/vendor/sysadmin may set the
binary setuid or use something like consolehelper in Fedora.

The supplied command gnome-timezone tries to identify all the ways the timezone
is set on a system and then changes each one.  For example, if the command finds
a timezone set by /etc/sysconfig/clock and /etc/localtime, it will change both.
 It does this by checking capabilities rather than checking OS version.  This is
in contrast to gnome-system-tools which only supports a hard-coded list of vendors.

After the timezone is set successfully, a message is sent on the system bus. 
This can alert processes, such as the clock applet and evolution, to update
their timezone settings.

The capplet UI listens for this message on the system bus to update itself.

Setting the date works similarly.  gnome-date simply parses a standard ISO date
format (in localtime without specifying timezone) and calls settimeofday().

Patch to follow.  Please let me know what you think.  Thanks.
Comment 1 William Jon McCann 2004-09-30 18:10:23 UTC
Created attachment 32119 [details]
tarball of initial release

drop tarball into capplets directory
Comment 2 William Jon McCann 2004-09-30 18:11:07 UTC
Created attachment 32120 [details] [review]
patch to enable build
Comment 3 William Jon McCann 2004-11-08 23:31:39 UTC
Comments anyone?  Trying to find the words to be a nag, politely... :)
Comment 4 Sebastien Bacher 2005-02-05 15:21:18 UTC
could you join a schema or the value of the gconf keys to set ?
Comment 5 William Jon McCann 2005-02-17 20:46:48 UTC
Created attachment 37618 [details]
updated gnome-date-time.tar.gz

Updated for gtk+-2.6 HIG dialogs, added schemas, and a README with
configuration tips.
Comment 6 Teppo Turtiainen 2005-07-15 18:13:28 UTC
Doesn't GNOME System Tools do this now?
Comment 7 Sebastien Bacher 2005-07-16 13:42:33 UTC
right, they have a similar capplet. Not sure of what would be the direction for
this. Maybe you could mail the desktop list about that?
Comment 8 Sebastien Bacher 2005-07-31 13:05:36 UTC
Could you mail the list about this?
Comment 9 Jens Granseuer 2008-05-13 19:22:44 UTC
*** Bug 532917 has been marked as a duplicate of this bug. ***
Comment 10 Jens Granseuer 2008-08-25 15:12:35 UTC
*** Bug 532917 has been marked as a duplicate of this bug. ***
Comment 11 Anders Berglund 2008-08-25 18:46:51 UTC
I would like to have the possibility so change the regional options (like
monetary, paper size, time and date formats...) from within Gnome. Many users
from outside USA prefer the operating system and interface language to be in
english and the regional options for their own country. I prefer en_US (GUI)
and sv_SE (regional options). To force a user to change user interface language
to get regional settings correct is not good.

The only way I have found to achieve this today is to edit the /etc/environment
file. This is not user friendly. Please add this feature to Gnome as it would
greatly improve it's useability. In some cases it is even useless without this
feature...

Posting here although I tried to make it a separate bug. In my world it should have been separate. I was trying to make developers aware of a much needed enhancement. I do not have much hope though when I see that this bug has not been (really) touched since 2005!!!

(Still don't agree with Jens about this beeing a duplicate.)
Comment 12 xavier.loup 2009-09-24 11:40:02 UTC
Adding a regional setting configuration tool is one of the "popular ideas" in ubuntu brainstorm : http://brainstorm.ubuntu.com/idea/21393/

Should the title of this bug be changed to "add regional settings configuration capplet" ?
Comment 13 Bastien Nocera 2010-09-23 13:08:29 UTC
There's a datetime panel now available in gnome-control-center for GNOME 3.