datetime: add fallback logic for AM/PM specifier

When the locale does not provide any string for AM/PM, fallback to the
default.

https://bugzilla.gnome.org/show_bug.cgi?id=761889
This commit is contained in:
Cosimo Cecchi 2017-04-03 08:30:25 -07:00
parent 6e192588e0
commit 69e448bc28

View File

@ -2216,6 +2216,9 @@ format_ampm (GDateTime *datetime,
ampm = GET_AMPM (datetime);
if (!ampm || ampm[0] == '\0')
ampm = get_fallback_ampm (g_date_time_get_hour (datetime));
#if defined (HAVE_LANGINFO_TIME)
if (!locale_is_utf8)
{