diff options
-rw-r--r-- | src/utils.c | 4 | ||||
-rw-r--r-- | tests/test-utils.cc | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/utils.c b/src/utils.c index 9b0f24f..bbb24ac 100644 --- a/src/utils.c +++ b/src/utils.c @@ -301,8 +301,8 @@ get_terse_time_format_string (GDateTime * time) if (g_date_time_get_minute (time) != 0) { - /* a strftime(3) fmt string for a HH:MM 12 hour time, eg "06:59 PM" */ - fmt = T_("%I:%M %p"); + /* a strftime(3) fmt string for a H:MM 12 hour time, eg "6:59 PM" */ + fmt = T_("%l:%M %p"); } else { diff --git a/tests/test-utils.cc b/tests/test-utils.cc index c757a11..d0f277b 100644 --- a/tests/test-utils.cc +++ b/tests/test-utils.cc @@ -78,12 +78,12 @@ TEST (UtilsTest, GenerateTerseFormatString) GDateTime * time; const char * expected_format_string; } test_cases[] = { - { g_date_time_ref(arbitrary_day), g_date_time_ref(arbitrary_day), "%I:%M %p" }, /* identical time */ - { g_date_time_ref(arbitrary_day), g_date_time_add_hours(arbitrary_day,1), "%I:%M %p" }, /* later today */ - { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,1), "Tomorrow" EM_SPACE "%I:%M %p" }, /* tomorrow */ - { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,2), "%a" EM_SPACE "%I:%M %p" }, - { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,6), "%a" EM_SPACE "%I:%M %p" }, - { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,7), "%d %b" EM_SPACE "%I:%M %p" }, /* over one week away */ + { g_date_time_ref(arbitrary_day), g_date_time_ref(arbitrary_day), "%l:%M %p" }, /* identical time */ + { g_date_time_ref(arbitrary_day), g_date_time_add_hours(arbitrary_day,1), "%l:%M %p" }, /* later today */ + { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,1), "Tomorrow" EM_SPACE "%l:%M %p" }, /* tomorrow */ + { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,2), "%a" EM_SPACE "%l:%M %p" }, + { g_date_time_ref(arbitrary_day), g_date_time_add_days(arbitrary_day,6), "%a" EM_SPACE "%l:%M %p" }, + { 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 */ { g_date_time_ref(on_the_hour), g_date_time_ref(on_the_hour), "%l %p" }, /* identical time */ { g_date_time_ref(on_the_hour), g_date_time_add_hours(on_the_hour,1), "%l %p" }, /* later today */ |