Red Hat Bugzilla – Bug 218438
strftime("%x") wrong with cs_CZ locale
Last modified: 2007-11-30 17:11:50 EST
Description of problem:
the "%x" date formatting string of strftime(3) or date(1) is incorrect for the
Czech locale (cs_CZ.UTF-8) - the output should not contain leading zeros.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. run "LC_ALL=cs_CZ.UTF-8 date +%x"
the Czech locale should not use leading zeros for the day or month number.
It seems the "%c" formating string is correct:
$ LC_ALL=cs_CZ.UTF-8 date +%c
Út 5. prosinec 2006, 12:33:21 CET
Created attachment 142830 [details]
Fix. Though, I believe we need Vladimir.Michl@upol.cz's ack for this first.
The month number still has leading zero, say 5.01.2006.
Wonder if d_fmt shouldn't be %e.%_m.%Y or %_d.%_m.%Y or even %-d.%-m.%Y
(I think the last one matches most the common usage, but I might be wrong).
probably the last option, that Jakub suggests %-d.%-m.%Y is the most common one
I think, the currect version (%d.%m.%Y) is acceptable as in computer generated
So I agree with Jakub to change it to %-d.%-m.%Y.
Similarly, for d_t_fmt, should we use %e or %-d? I believe there the
decision is easier, the month names have variable lengths and two spaces
between day name and day of month for 1. through 9. look very ugly.
It seems strftime can't do what we really would want to do for %c though,
perticularly use different form of the full month name, we want
Ut 5. prosince 2006, 12:33:21 CET rather than Ut, 5. prosinec 2006, 12:33:21 CET.
Not sure if we could abuse %EB for this, certainly it would mean a strftime
extension and also extending LC_TIME locale format to store the alternate
forms of month names.
I am for %-d here.
As for the month name variant, it would be nice to have the alternative month
names for %c, whith %EB as a repository for the alternative month names.
BTW, can the time zone names be localized as well? The "CET" name also does not
look good when embedded into the Czech text. SEČ/SELČ would definitely be better
Created attachment 142843 [details]
This patch is now in CVS and glibc-2.5.90-11 in rawhide.