GTG

GTG date format should follow locale

Bug #515042 reported by Luca Invernizzi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GTG
Fix Released
Wishlist
Izidor Matušov

Bug Description

Robert Zelnik wrote:

"Hi, thanks for GTG, it's great. I would suggest to incorporate a date formatting preference set by the user, or, even better, to follow the user's locale settings.

For your info:
http://en.wikipedia.org/wiki/Date_and_time_notation_by_country"

Changed in gtg:
status: New → Confirmed
importance: Undecided → Wishlist
milestone: none → 0.3
Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

I don't think it's possible to follow the user's locale setting, because there is no unambiguous 1:1 mapping between locales and date formats. For example, read the first paragraph under the subheading "Date" at http://en.wikipedia.org/wiki/Date_and_time_notation_by_country#Canada

Another reference is the gedit "Date" plugin, code for which is here:
http://git.gnome.org/browse/gedit/tree/plugins/time/gedit-time-plugin.c
...they seem to provide a number of options in a drop-down, and default to ISO 8601.

tags: added: prefs-dialog
Revision history for this message
Luca Invernizzi (invernizzi) wrote :

We could just follow the same format as the command date +"%c", which writes the date in "current locale".

Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Paul > this should not be a "per application" setting. There's a setting (LC_DATE ?) that give the current date locale. In GNOME, each application should follow system settings and not allow the user to have to set his setting for each application.

 "locale" is not only about the country or the language. It also defines stuffs like currency and date format.

Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote :

It's wrong in my case :( — see bug #517397. But yes, you are right:

import locale, time
locale.setlocale(locale.LC_TIME, '')
print time.strftime('%x')

description: updated
Revision history for this message
Luca Invernizzi (invernizzi) wrote :

if you just want the format string, you can use print locale.nl_langinfo(locale.D_FMT)

Revision history for this message
Luca Invernizzi (invernizzi) wrote :

Now dates are in locale's format in the TaskBrowser

Changed in gtg:
status: Confirmed → In Progress
tags: removed: prefs-dialog
Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Is this bug currently fixed in Trunk? If yes, who fixed that?

Changed in gtg:
status: In Progress → Incomplete
Revision history for this message
Izidor Matušov (izidor) wrote :

I can confirm this is fixed (touch that code during the merge of new date class, rev 1089)

Changed in gtg:
assignee: nobody → Izidor Matušov (izidor)
status: Incomplete → Fix Committed
Changed in gtg:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.