Merge lp:~macslow/indicator-datetime/fix-1236288 into lp:indicator-datetime/14.04

Proposed by Mirco Müller
Status: Rejected
Rejected by: Ted Gould
Proposed branch: lp:~macslow/indicator-datetime/fix-1236288
Merge into: lp:indicator-datetime/14.04
Diff against target: 37 lines (+8/-8)
2 files modified
src/utils.c (+2/-2)
tests/test-utils.cc (+6/-6)
To merge this branch: bzr merge lp:~macslow/indicator-datetime/fix-1236288
Reviewer Review Type Date Requested Status
Ted Gould (community) Disapprove
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+191647@code.launchpad.net

Commit message

Use always a 24h-format for time-display.

Description of the change

Use always a 24h-format for time-display... fixes LP: #1236288

To post a comment you must log in.
279. By Mirco Müller

Don't forget to push the updated test too.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ted Gould (ted) wrote :

Comments on the bug about the design.

review: Needs Information
Revision history for this message
Ted Gould (ted) wrote :

Actually, I'm going to reject this. Because, if design wants to make a phone that is unsellable in the US they should do that by installing a dconf override for the 'time-format' key so that we don't break desktop.

Revision history for this message
Ted Gould (ted) :
review: Disapprove
Revision history for this message
Lars Karlitski (larsu) wrote :

Ted, I very much agree with you here. This code doesn't look like it's using the time-format key, though.

Revision history for this message
Charles Kerr (charlesk) wrote :

I agree with both of you. This code isn't using the dconf keys right now (it's currently a hardcoded format on the phone) AND 12h is the clear default for end-user US devices.

From a coding standpoint, we may want to clone the existing desktop dconf keys so that both profiles can use the same code to generate time format strings. This /doesn't/ mean that they all the desktop options need to be exposed on the phone -- perhaps a 21h/24h toggle would be enough there?

Unmerged revisions

279. By Mirco Müller

Don't forget to push the updated test too.

278. By Mirco Müller

Use always a 24h-format for time-display. Fixes LP: #1236288

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/utils.c'
2--- src/utils.c 2013-10-03 21:16:24 +0000
3+++ src/utils.c 2013-10-17 14:22:32 +0000
4@@ -297,8 +297,8 @@
5 const gchar*
6 get_terse_header_time_format_string (void)
7 {
8- /* a strftime(3) fmt string for a H:MM 12 hour time, eg "6:59 PM" */
9- return T_("%l:%M %p");
10+ /* a strftime(3) fmt string for a H:MM 24 hour time, eg "17:59" */
11+ return T_("%H:%M");
12 }
13
14 const gchar *
15
16=== modified file 'tests/test-utils.cc'
17--- tests/test-utils.cc 2013-10-03 14:36:25 +0000
18+++ tests/test-utils.cc 2013-10-17 14:22:32 +0000
19@@ -78,12 +78,12 @@
20 GDateTime * time;
21 const char * expected_format_string;
22 } test_cases[] = {
23- { g_date_time_ref(arbitrary_day), g_date_time_ref(arbitrary_day), "%l:%M %p" }, /* identical time */
24- { g_date_time_ref(arbitrary_day), g_date_time_add_hours(arbitrary_day,1), "%l:%M %p" }, /* later today */
25- { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,1), "Tomorrow" EM_SPACE "%l:%M %p" }, /* tomorrow */
26- { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,2), "%a" EM_SPACE "%l:%M %p" },
27- { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,6), "%a" EM_SPACE "%l:%M %p" },
28- { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,7), "%d %b" EM_SPACE "%l:%M %p" }, /* over one week away */
29+ { g_date_time_ref(arbitrary_day), g_date_time_ref(arbitrary_day), "%H:%M" }, /* identical time */
30+ { g_date_time_ref(arbitrary_day), g_date_time_add_hours(arbitrary_day,1), "%H:%M" }, /* later today */
31+ { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,1), "Tomorrow" EM_SPACE "%H:%M" }, /* tomorrow */
32+ { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,2), "%a" EM_SPACE "%H:%M" },
33+ { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,6), "%a" EM_SPACE "%H:%M" },
34+ { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,7), "%d %b" EM_SPACE "%H:%M" }, /* over one week away */
35
36 { g_date_time_ref(on_the_hour), g_date_time_ref(on_the_hour), "%l %p" }, /* identical time */
37 { g_date_time_ref(on_the_hour), g_date_time_add_hours(on_the_hour,1), "%l %p" }, /* later today */

Subscribers

People subscribed via source and target branches