Comment 13 for bug 579134

Revision history for this message
Martin Pitt (pitti) wrote :

This was recently discussed in #ubuntu-desktop, and the result was that the most robust solution is to ask

  nl_langinfo (T_FMT)
     == '%T' -> 24 hour
     == '%r' -> AM/PM

T_FMT is what strftime(%X) uses as well.

  http://sourceware.org/git/?p=glibc.git;a=blob;f=time/strftime_l.c;h=08c2aeb32be6421cb8075dfae3579da4ee02644a;hb=HEAD#l1177