summaryrefslogtreecommitdiff
path: root/locale/programs/ld-time.c
diff options
context:
space:
mode:
Diffstat (limited to 'locale/programs/ld-time.c')
-rw-r--r--locale/programs/ld-time.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
index b977763433..60c54deb3a 100644
--- a/locale/programs/ld-time.c
+++ b/locale/programs/ld-time.c
@@ -127,7 +127,12 @@ time_finish (struct localedef_t *locale)
TEST_ELEM (d_t_fmt);
TEST_ELEM (d_fmt);
TEST_ELEM (t_fmt);
- TEST_ELEM (t_fmt_ampm);
+
+ /* According to C.Y.Alexis Cheng <alexis@vnet.ibm.com> the T_FMT_AMPM
+ field is optional. */
+ if (time->t_fmt_ampm == NULL)
+ /* Use the 24h format as default. */
+ time->t_fmt_ampm = time->t_fmt;
/* Now process the era entries. */
if (time->cur_num_era != 0)