Custom locale to use ISO 8601 date format
A.J. Kehoe IV (Nanoman)
nanoman at nanoman.ca
Sun Jun 7 14:51:08 UTC 2015
andrew clarke 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.
Canada uses ISO 8601, but this isn't reflected in FreeBSD's en_CA locale, so I submitted this patch:
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.
A.J. Kehoe IV (Nanoman) | /"\ ASCII Ribbon Campaign
Nanoman's Company | \ / - No HTML/RTF in E-mail
E-mail: nanoman at nanoman.ca | X - No proprietary attachments
WWW: http://www.nanoman.ca/ | / \ - Respect for open standards
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3924 bytes
Desc: not available
More information about the freebsd-questions