Custom time format in datetime applet cannot handle some format specifiers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| GLib |
Fix Released
|
Medium
|
||
| Indicator Date and Time |
Fix Released
|
Low
|
Javier Jardón | |
| Unity Foundations |
Low
|
Javier Jardón | ||
| indicator-datetime (Ubuntu) |
Undecided
|
Unassigned |
Bug Description
When I try to set the custom format of the datetime indicator using dconf-editor (/com/canonical
My format is "%V | %F, %R", which should result in "<ISO-week-number> | <ISO-date>, <24-hour time>".
I've tried %W instead of %V, to no avail.
What happens: Nothing (or an empty string) is displayed in the datetime indicator.
What I expect to happen: The format should accept any strftime-valid format, just like I expect coming from GNOME2.
Further information:
When I remove the %V portion (and %W), the format works. (" | %F, %R")
I'm not sure if it's only the week number that doesn't work; it's possible other flags are non-functional as well. I haven't tested every single flag. :)
Related branches
- Indicator Applet Developers: Pending requested 2011-09-02
-
Diff: 47 lines (+9/-3)2 files modifiedconfigure.ac (+1/-1)
src/indicator-datetime.c (+8/-2)
- Ken VanDine: Pending requested 2011-10-13
-
Diff: 301 lines (+59/-27) (has conflicts)8 files modifiedChangeLog (+32/-0)
configure (+10/-19)
configure.ac (+1/-2)
data/datetime-dialog.ui (+0/-1)
debian/changelog (+14/-0)
debian/control (+0/-2)
src/datetime-prefs.c (+0/-1)
src/datetime-service.c (+2/-2)
affects: | ubuntu → indicator-datetime (Ubuntu) |
Changed in indicator-datetime (Ubuntu): | |
status: | New → Confirmed |
Remon Huijts (rahuijts) wrote : | #1 |
Remon Huijts (rahuijts) wrote : | #2 |
Bug #730476:
"In the code, measuring is done using the strftime function while the rendering uses g_date_time_format. It seems these two functions use different parts of the locale settings."
g_date_time_format does not support %V or %U:
http://
Is this an upstream bug, or should the indicator-datetime be using strftime instead (which I thought it did)?
Javier Jardón (jjardon) wrote : | #3 |
Yeah, we are using the g_date_
The format strings understood by this function are a subset of the strftime() format language, see http://
Feel free to open a bug upstream to add the time specifiers you need
summary: |
- Custom time format in datetime applet cannot handle week number. + Custom time format in datetime applet cannot handle some format + specifiers |
Javier Jardón (jjardon) wrote : | #4 |
FYI %T support was added in Glib recently and will be available in Glib 2.30 (oneiric)
Remon Huijts (rahuijts) wrote : | #5 |
If it is impossible or undesirable to use strftime() instead of g_date_
"Summary: The format string passed to strftime"
The description should be revised as well:
"Description: The format of the time and/or date that is visible on the panel when using
the indicator. For most users this will be a set of predefined values as
determined by the configuration utility, but advanced users can change it
to anything strftime can accept. Look at the man page on strftime for
more information."
But I hope it is possible to change the indicator-datetime code to use strftime(), simply because that function does the job already and no upstream fix would be required.
Victor Zamanian (victorz) wrote : | #6 |
#5: +1.
Although as far as I'm concerned (as a user!) this is a regression. A regression of the "I want to be able to tell time by the same format as I did in the last version of Ubuntu" functionality. It doesn't seem fair that it would be enough to say it's just a documentation issue. That would be like upgrading from Office 2003 to Office 2007 and all of a sudden Word doesn't feature a WYSIWYG interface anymore, but wait, it clearly states in the manual on the CD/DVD that this is the case, so that means it's okay?
Clearly most users would be like "wtf? No." :)
Remon Huijts (rahuijts) wrote : | #7 |
@victorz:
That (Gnome?) version allowed some HTML tags as well, but I need them less than the ISO 8601 week number, which is the standard in my country (The Netherlands).
Victor Zamanian (victorz) wrote : | #8 |
@rahuijts: Same here. I didn't use HTML either, and the ISO week number is standard here in Sweden as well. This is a localization/
Changed in indicator-datetime: | |
status: | New → In Progress |
Changed in indicator-datetime: | |
assignee: | nobody → Javier Jardón (jjardon) |
Changed in unity-foundations: | |
assignee: | nobody → Javier Jardón (jjardon) |
milestone: | none → oneiric-beta-2 |
status: | New → In Progress |
Changed in indicator-datetime: | |
importance: | Undecided → Low |
Changed in unity-foundations: | |
importance: | Undecided → Low |
Changed in glib: | |
importance: | Undecided → Unknown |
status: | New → Unknown |
Javier Jardón (jjardon) wrote : | #9 |
The problem is that it's not generally possible to ask the libc to deal with any timezones other than local and utc
So lets fix this in the proper way and fix the glib function to support more formats.
Javier Jardón (jjardon) wrote : | #10 |
Support for all the remaining strftime() specifiers was added upstream
Changed in glib: | |
importance: | Unknown → Medium |
status: | Unknown → Fix Released |
Changed in indicator-datetime: | |
status: | In Progress → Fix Committed |
milestone: | none → 0.2.94 |
Changed in unity-foundations: | |
status: | In Progress → Fix Committed |
Changed in indicator-datetime: | |
status: | Fix Committed → Fix Released |
Launchpad Janitor (janitor) wrote : | #11 |
This bug was fixed in the package indicator-datetime - 0.2.95-0ubuntu1
---------------
indicator-datetime (0.2.95-0ubuntu1) oneiric; urgency=low
[ Ted Gould ]
* New upstream release.
* Set default timezone on events without (LP: #837359)
* Update docs to specify correct custom formats (LP: #775113)
* Remove add event when using greeter (LP: #836521)
* Fix gettext domain for builder files (LP: #845473)
* Update date correctly when opening menu (LP: #793450)
[ Didier Roche ]
* debian/control:
- bump the libglib build-dep
-- Ted Gould <email address hidden> Thu, 15 Sep 2011 10:45:57 -0500
Changed in indicator-datetime (Ubuntu): | |
status: | Confirmed → Fix Released |
Changed in unity-foundations: | |
status: | Fix Committed → Fix Released |
%W works in my format, but %U and %V don't. They blank the whole datetime display, although the required space is still reserved.
%a %d-%m-%Y (Wk%V) %H:%M:%S
displays nothing, but is equally wide as
%a %d-%m-%Y (Wk%W) %H:%M:%S
which displays the correct date and time on my system (but I need the other week number).
%V %V %V is blank and three times as wide as just %V