Bug 12731 - en_CA: date-time format doesn't respect CAN/CSA-Z234.4 - ISO 8601
Summary: en_CA: date-time format doesn't respect CAN/CSA-Z234.4 - ISO 8601
Status: REOPENED
Alias: None
Product: glibc
Classification: Unclassified
Component: localedata (show other bugs)
Version: 2.13
: P2 normal
Target Milestone: ---
Assignee: GNU C Library Locale Maintainers
URL:
Keywords:
Depends on: 4628
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-05 06:04 UTC by Alexandre Demers
Modified: 2016-05-20 13:52 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
Patch to follow the CSA - ISO (472 bytes, patch)
2011-05-05 06:04 UTC, Alexandre Demers
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Demers 2011-05-05 06:04:05 UTC
Created attachment 5703 [details]
Patch to follow the CSA - ISO

According to the SCC, the date and time format should follow CAN/CSA-Z234.4 which is compatible with ISO 8601. In particular, hours should be in a 24 hour format instead of a 12 hour format and year should be made of 4 digits. Proposing a patch in attachment.
Comment 1 Ulrich Drepper 2011-05-09 13:17:58 UTC
It is not the "standard" format that is used.  Almost everywhere in the world ISO 8601 is a standard.  But it is not the format people expect and that is what locales are about.  Programs and scripts can easy use ISO 8601 where wanted.
Comment 2 Alexandre Demers 2011-05-09 16:29:03 UTC
According to National Research Council Canada (NRC) and to Standard Council of Canada (SCC), the standard for date time format in Canada has to follow CAN/CSA-Z234.4 which says mostly the same as ISO 8601. Have a look at the official site (http://www.nrc-cnrc.gc.ca/eng/ibp/inms/about/faq-time.html#Q8):

"Canadian Standard CAN Z234-4 specifies numeric representations of date and time. The recommended full format is of the form 2001-12-31 23:59:28.73 UTC. It is compatible with International Standard ISO 8601."

This means this is the format people are (should be) expecting. Thus, the current locale file is incorrect and the patch should be applied. Without the patch, the en_CA locale follows the US standard, which is one of the none official way of writting the date time format here (we use three different ways to write date time, but only one is official and should be used).
Comment 3 Alexandre Demers 2011-05-09 18:06:27 UTC
As a follow up, Ubuntu bug filed in 2010 about this problem:
https://bugs.launchpad.net/ubuntu/+source/langpack-locales/+bug/517397
Comment 4 Ulrich Drepper 2011-05-10 19:15:48 UTC
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.
Comment 5 Alexandre Demers 2011-05-10 21:23:01 UTC
I do understand your point and I respect it. I usually change the format to ISO 8601 in my applications when it's possible. I also agree that if this is the format people are expecting, it should also stay as it is. Googling the question shows very different answers. Wikipedia says the format is used in Canada along with others (http://en.wikipedia.org/wiki/Calendar_date). It's true that I come from Quebec, where we use a lot more the ISO format/official canadian sources, so I must be biased and that must explain why I usually see a different format than the one in en_CA even if I'm living with, writing to and working with english people here.

Cheers,
Alex
Comment 6 Florian Weimer 2016-02-04 13:44:33 UTC
The Canadian government uses %Y-%m-%d as the short date format at least, unlike many other governments who claim to have adopted ISO 8601.
Comment 7 Carlos O'Donell 2016-05-20 13:52:36 UTC
(In reply to Alexandre Demers from comment #2)
> According to National Research Council Canada (NRC) and to Standard Council
> of Canada (SCC), the standard for date time format in Canada has to follow
> CAN/CSA-Z234.4 which says mostly the same as ISO 8601. Have a look at the
> official site
> (http://www.nrc-cnrc.gc.ca/eng/ibp/inms/about/faq-time.html#Q8):
> 
> "Canadian Standard CAN Z234-4 specifies numeric representations of date and
> time. The recommended full format is of the form 2001-12-31 23:59:28.73 UTC.
> It is compatible with International Standard ISO 8601."
> 
> This means this is the format people are (should be) expecting. Thus, the
> current locale file is incorrect and the patch should be applied. Without
> the patch, the en_CA locale follows the US standard, which is one of the
> none official way of writting the date time format here (we use three
> different ways to write date time, but only one is official and should be
> used).

As a participating member of SCC's CAC/JTC1/SC22 my perspective is that while the standard is fine for Government use, the en_CA locale is intended for colloquial use. If you have government uses then you need to create your own locale.

I believe we will solve this with a C.UTF-8@ISO8601 locale that follows the ISO 8601 time standard and can be used for LC_TIME to replace the current locales time.