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

[-- Attachment #1 --]
andrew clarke wrote:
>On Sun 2015-06-07 10:42:32 UTC-0400, A.J. Kehoe IV (Nanoman) (nanoman@nanoman.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=en_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 visiting a foreign country!  And the imperial to metric conversion app on my mobile 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=200079
>
>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 Council 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 country that doesn't use ISO 8601.  Fortunately for me, all the systems I'm responsible for are in Canada, so I wouldn't have to do anything other than get this patch committed.

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

[-- Attachment #2 --]
0P	*H
A0=10	+0	*H
0w0_8b0
	*H

0y10U
Root CA10Uhttp://www.cacert.org1"0 UCA Cert Signing Authority1!0	*H
	support@cacert.org0
150210175026Z
150809175026Z0=10UCAcert WoT User1!0	*H
	nanoman@nanoman.ca0"0
	*H
0
VDj
@[H}K4٪:CJyckXmi
~F6x1JoeHQL`w&.PH"w}|oѬݘ2r6ڛ?
p	.yaw Nc^ʽhNmHo$lsB1hXy
XUşkք))RnZg_Îhc$u^SϏdmoA#k>x;AsB0>0U00V	`HB
IGTo get your own certificate for FREE head over to http://www.CAcert.org0U0@U%907++
+7

+7
	`HB02+&0$0"+0http://ocsp.cacert.org01U*0(0&$" http://crl.cacert.org/revoke.crl0U0nanoman@nanoman.ca0
	*H

NX(A%G؂+h'`Jqlœki0WUKL{7{V[ 2LAyEE*}ODCoC]'FSph/^o<2O0+jV`"J[ֱvбk?l7|>}7LfQqaEd&F"*KY^|mUG}y۳.Qjk^ǭr[݇H\.|46`/SAwI
AP3/&sRn~{;g2	(fMU
|<x3]n(]<3,x`1Ho]KWG-Φ)m
%ݴkK"h٪ʴgy|%I)Rhn[wG~K?|{ܒس0.%j]Dt_ǾXu2CeLM Hpok_ydj?#7CAjsLVvܚzx"*,滑z$%QA2
ܿ ա0=0%0
	*H
0y10U
Root CA10Uhttp://www.cacert.org1"0 UCA Cert Signing Authority1!0	*H
	support@cacert.org0
030330122949Z
330329122949Z0y10U
Root CA10Uhttp://www.cacert.org1"0 UCA Cert Signing Authority1!0	*H
	support@cacert.org0"0
	*H
0
"F}6(P3@K;f?1k6|Nw6A	Fs`n~XdͰEcg
ҿ>L5]l!ޞ ٺf27rXɎ^>
l[df*zKSy{/
a+~MVڒDAX`efD˔B~ehQWkzr%[ 2H.0B%k?:SHҶ4zX+[8]fɘמtqr`o34v>$zoE8GAJ.	Yתғ}h.݋KX/ꕧTۋQ"þ,x ӊ/?Qe!eE|ALO)!3uQwi"Ṕ1{8h[+~_rLK Wʑu!7c
g>FOp gYͺbA )d)B"xC	QKZZqs00U2Ұ:90U#02Ұ:9ѡ}{0y10U
Root CA10Uhttp://www.cacert.org1"0 UCA Cert Signing Authority1!0	*H
	support@cacert.org0U002U+0)0'%#!https://www.cacert.org/revoke.crl00	`HB#!https://www.cacert.org/revoke.crl04	`HB'%http://www.cacert.org/index.php?id=100V	`HB
IGTo get your own certificate for FREE head over to http://www.cacert.org0
	*H
(\5
ojhX>ÐZ`CpbgX
06;Htq>+h4b@F;S(fSM];`yi;eƁ\MU7paj|.T>O!܂EMs<evj7$NmQďʖmC0e';{CCcCh"{Z>7;N˛͚۲p-JذoEH3<2*T#Gdzqc~/ܟ+H%B>Wiw4
Kʠƌ27hs_QIS6
Ly:u
pg/y=sog/${H5)@`ᖆPzY؏!ς;kV#lH<N/	So.t:c¦D
l$pG.Բ 	d$ܡ5ԼU.}UZ֓v%sLC1\0X00y10U
Root CA10Uhttp://www.cacert.org1"0 UCA Cert Signing Authority1!0	*H
	support@cacert.org8b0	+0	*H
	1	*H
0	*H
	1
150607162911Z0#	*H
	1OlfL906uVf0R	*H
	1E0C0
*H
0*H
0
*H
@0+0
*H
(0
	*H
Ail-r6SVٓɲ|ws+j&)Ļk˼,fYgW˻O)k|B<7B)gUq	ITgً)f.(L/IѫnZ+!3e]dr7qR;?-Hk9鎷6w~M$inUXqV7cVzﰇA`|r9dugX,w.<y@d+S v+D^jk,K-

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150607162911.GB61785>