@mterry: Your test program seems to give the correct result, but -- what
will you do with the 24/12hr information in the end? There is "%R" for a
locale-dependent 24h format without seconds but no equivalent for 12h
that I'm aware of. Simply using "%I:%M %p" for 12hr locales would not
make everyone happy.
I think using translations might actually work if you use a little hack,
something along the lines of:
char *message_locale = setlocale(LC_MESSAGES, NULL);
char *time_locale = setlocale(LC_TIME, NULL);
setlocale(LC_MESSAGES, time_locale);
char *time_format = _("%I:%M %p"); /* This will be translated using the PO file
corresponding to LC_TIME!*/
setlocale(LC_MESSAGES, message_locale);
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/652976
Title:
Time format not taken from LC_TIME
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs