This is the mail archive of the libc-locales@sourceware.org mailing list for the GNU libc locales project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug localedata/16668] New: ISO date time format localedef needed for en_CA


https://sourceware.org/bugzilla/show_bug.cgi?id=16668

            Bug ID: 16668
           Summary: ISO date time format localedef needed for en_CA
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: localedata
          Assignee: unassigned at sourceware dot org
          Reporter: byrnejb@harte-lyne.ca
                CC: libc-locales at sourceware dot org

This is an ongoing problem whose resolution seems stymied by an intransigent
maintainer.  See bug: Bug 12731 and Bug 9842.

The Government of Canada requires that dates and times on official documents be
formatted according to the ISO8901.  If altering the locales en_CA and fr_CA
are out of the question then cannot two supplemental locales, say en_CA@ISO and
en_fr@ISO, that address this issue be provided as well?

We deal with the Canadian Government via EDI and they require yyyy-mm-dd on our
transmissions.  We have had the painful experience of having to create our own
LOCALE definition file and then distribute it in order that our RedHatEL6 based
systems reflect this requirement.  We filed a bug with RH and they directed us
here.  Based on what I have read about this issue elsewhere on this site I have
little confidence that anything constructive will be done.

I must say that I was nonplussed when I read this statement in bug: 12731:

> It is completely irrelevant what should be expected.  Locales are
> about what people are using.  Programs displaying times all should
> have a special ISO 8601 mode and that's how you allow people to
> read the time this way.  If you don't like that then compile your
> own locale.  That's why there is a standardized lcoaledef program.
>  But I'm not going to change the format everyone but you expect under
> people's feet."

In point of fact, my experience with LOCALEs on Linux is that the one most
often used in Canada is en_US whose date format conforms neither with what
'everyone' in Canada is supposedly using according to the above statement nor
with what the Canadian Government has mandated.  Anyone who is selecting to use
either the en_CA or fr_CA is already in a tiny minority.  Given the mindset
evidenced in the argument used above to not include ISO8601 date time formats
in them one can only wonder then why en_CA and fr_CA local definitions are
provided at all.

Further, programs such as OpenOffice and LibreOffice depend upon the LOCALE
setting for their default formats and have maintainers that are as steadfast in
their refusal to provide an easy means for users to set a different default as
the glibc maintainers are in changing the en_CA or fr_CA locales to meet the
legal standard.

I have used the recommended, if woefully under-documented and Byzantinely
arcane, so-called standardized localedef program, whose syntax and usage are a
mute, and I mean MUTE -- why is there no man page for this? --, testament to
why *nix OSes are so unnecessarily hard to deal with.  Making end users
responsible for customizing their LOCALEs with an obscured<sic> cli utility
program because they are not just like 'everyone' else seems a little callous. 
Or perhaps painfully encoding the necessary strftime formatting characters into
UTF-8 code-points is something that every user of glibc should just get
comfortable with.

Is this what you really expect an end user to have to deal with just to set the
default date format on their systems?

LC_TIME
abday       "<U0053><U0075><U006E>";"<U004D><U006F><U006E>";/
            "<U0054><U0075><U0065>";"<U0057><U0065><U0064>";/
            "<U0054><U0068><U0075>";"<U0046><U0072><U0069>";/
            "<U0053><U0061><U0074>"
day         "<U0053><U0075><U006E><U0064><U0061><U0079>";/
            "<U004D><U006F><U006E><U0064><U0061><U0079>";/
            "<U0054><U0075><U0065><U0073><U0064><U0061><U0079>";/
            "<U0057><U0065><U0064><U006E><U0065><U0073><U0064><U0061><U0079>";/
            "<U0054><U0068><U0075><U0072><U0073><U0064><U0061><U0079>";/
            "<U0046><U0072><U0069><U0064><U0061><U0079>";/
            "<U0053><U0061><U0074><U0075><U0072><U0064><U0061><U0079>"
abmon       "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/
            "<U004D><U0061><U0072>";"<U0041><U0070><U0072>";/
            "<U004D><U0061><U0079>";"<U004A><U0075><U006E>";/
            "<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/
            "<U0053><U0065><U0070>";"<U004F><U0063><U0074>";/
            "<U004E><U006F><U0076>";"<U0044><U0065><U0063>"
mon         "<U004A><U0061><U006E><U0075><U0061><U0072><U0079>";/
            "<U0046><U0065><U0062><U0072><U0075><U0061><U0072><U0079>";/
            "<U004D><U0061><U0072><U0063><U0068>";/
            "<U0041><U0070><U0072><U0069><U006C>";/
            "<U004D><U0061><U0079>";/
            "<U004A><U0075><U006E><U0065>";/
            "<U004A><U0075><U006C><U0079>";/
            "<U0041><U0075><U0067><U0075><U0073><U0074>";/
            "<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
            "<U004F><U0063><U0074><U006F><U0062><U0065><U0072>";/
            "<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
            "<U0044><U0065><U0063><U0065><U006D><U0062><U0065><U0072>"
d_t_fmt    
"<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0072><U0020><U0025><U005A>"

% Original date format (%m/%d/%Y)
%d_fmt       "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"

% Custom date format (%Y-%b-%d)
d_fmt       "<U0025><U0059><U002d><U0025><U0062><U002d><U0025><U0064>"

% Original time format %r (%H:%M:%S am|pm)
%t_fmt       "<U0025><U0072>"
%am_pm       "<U0041><U004D>";"<U0050><U004D>"
%t_fmt_ampm 
"<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0070>"

% 24 hour time %T (HH:mm:ss) no am/pm.
t_fmt   "<U0025><U0054>"
am_pm   "";""
t_fmt_ampm ""

date_fmt    "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U005A><U0020><U0025><U0059>"
END LC_TIME

And of course, all this encoding and editing is necessary before one even
begins to use the localedef program, assuming one can discover its existence
and uncover which files to edit.

Is their any reason why supplemental en_CA@ISO and fr_CA@ISO localdefs should
not be provided with glibc as an alternative for those of us 'no-ones' that
have a requirement to use ISO format dates and times and are not conversant
with hand encoding data into UTF-8?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]