Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Jun 2015 12:29:11 -0400
From:      "A.J. Kehoe IV (Nanoman)" <nanoman@nanoman.ca>
To:        andrew clarke <mail@ozzmosis.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Custom locale to use ISO 8601 date format
Message-ID:  <20150607162911.GB61785@nanocomputer.nanoman.ca>
In-Reply-To: <20150607153130.GA80377@ozzmosis.com>
References:  <20150607085130.GA77300@ozzmosis.com> <20150607144231.GA61785@nanocomputer.nanoman.ca> <20150607153130.GA80377@ozzmosis.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--K8nIJk4ghYZn606h
Content-Type: text/plain; charset=iso-8859-1; format=flowed
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

andrew clarke wrote:
>On Sun 2015-06-07 10:42:32 UTC-0400, A.J. Kehoe IV (Nanoman) (nanoman@nano=
man.ca) wrote:
>
>> >Here in Australia the general population uses the British DD/MM/YY
>> >format for representing dates, eg. today is 07/06/15, and the
>> >en_AU.UTF-8 locale in FreeBSD 10.1 honours that:
>> >
>> >lrwxr-xr-x  1 root  wheel  22 17 Feb  2011 /usr/share/locale/en_AU.UTF-=
8/LC_TIME -> ../en_GB.UTF-8/LC_TIME
>> >
>> >However I wanted programs to use the ISO 8601 YYYY-MM-DD date format
>> >(2015-06-07) instead. To do this in Linux, the general method seems to
>> >set LC_TIME=3Den_DK.utf8, but FreeBSD has no locale by that name.
>>
>> [...]
>>
>> Thanks for sharing your patch, Andrew!  Personally, I wish everybody
>> would adopt ISO 8601, or even ISO 2014, which was standardized twelve
>> years earlier in the year 1976.
>
>I'd like to see that too, I'm not holding my breath. Maybe after the US
>moves to metric... ;-)

But then visitors to the United States would feel less like they're visitin=
g a foreign country!  And the imperial to metric conversion app on my mobil=
e telephone would become less useful.

>I'm not suggesting en_AU.*/LC_TIME be changed system-wide. The patch
>just works for me locally and I'm fine with that.

My understanding is that the Australian government hasn't adopted ISO 8601,=
 so I wouldn't suggest this either.

>> Canada uses ISO 8601, but this isn't reflected in FreeBSD's en_CA
>> locale, so I submitted this patch:
>>
>> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D200079
>
>That's encouraging to hear. I think you'll need to provide a
>better source than Wikipedia though.

You're right.  Canada's official time is defined by National Research Counc=
il Canada.  They recommend ISO 8601:

http://www.nrc-cnrc.gc.ca/eng/services/time/index.html

http://www.nrc-cnrc.gc.ca/eng/services/time/faq/#Q8

>Also, obviously what the standards association has adopted and what's
>actually used by the general public can be two different things.
>System locales should probably err on the side of what is already
>being used. Of course what is being used can also be dictated by the
>system locale, so it's a bit chicken-and-egg really.
>
>And all of this assumes the programs you use honour your chosen
>locale. Some apps blindly ignore it, and some have their own setting
>for the date/time format, with the pros and cons of doing that.

I agree.  Here's an example that may never be adopted:

http://www.ietf.org/rfc/rfc2550.txt

>> After somebody commits this patch (or a patch that does something
>> similar), you could use en_CA instead of having to manually patch
>> every system you maintain.
>
>I could, but I'll be doing the latter since it means I'll always have
>complete control over my locale. Plus I only maintain a couple of FreeBSD
>systems where locale really matters to me on a daily basis. A once-off
>rsync of $HOME/locale/ is no big deal.

Still, it would be nice to be able to change only LC_TIME if you're in a co=
untry that doesn't use ISO 8601.  Fortunately for me, all the systems I'm r=
esponsible for are in Canada, so I wouldn't have to do anything other than =
get this patch committed.

--=20
A.J. Kehoe IV (Nanoman)     |  /"\  ASCII Ribbon Campaign
Nanoman's Company           |  \ /   - No HTML/RTF in E-mail
E-mail: nanoman@nanoman.ca  |   X    - No proprietary attachments
WWW: http://www.nanoman.ca/ |  / \   - Respect for open standards

--K8nIJk4ghYZn606h
Content-Type: application/x-pkcs7-signature
Content-Disposition: attachment; filename="smime.p7s"
Content-Transfer-Encoding: base64

MIIPUAYJKoZIhvcNAQcCoIIPQTCCDz0CAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCC
DLwwggV3MIIDX6ADAgECAgMQOGIwDQYJKoZIhvcNAQENBQAweTEQMA4GA1UEChMHU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