From owner-freebsd-questions@FreeBSD.ORG Sun Jun 7 15:31:35 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB8BCA7F for ; Sun, 7 Jun 2015 15:31:34 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: from homiemail-a43.g.dreamhost.com (sub5.mail.dreamhost.com [208.113.200.129]) by mx1.freebsd.org (Postfix) with ESMTP id BF15A1695 for ; Sun, 7 Jun 2015 15:31:33 +0000 (UTC) (envelope-from mail@ozzmosis.com) Received: from homiemail-a43.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a43.g.dreamhost.com (Postfix) with ESMTP id 436F08C05F; Sun, 7 Jun 2015 08:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=ozzmosis.com; h=date:from :to:cc:subject:message-id:references:mime-version:content-type: in-reply-to; s=ozzmosis.com; bh=1pRVT/DWXsOKR7KdlCLJhv8DBQs=; b= pZXf9S/wXknU9PMpTYt+6BYjbjRZJqwGVbMBUKtmdyE2UInad5rv9ekKPlE5tr1Y N+TovM0cgixTRDjoAv8Q6tgsBkdjvpee++yJLmQSGQUdE15PNIiW5/g8QpuDfFiN 3nX661gCqk1/fWUxmVFPfcDJEf+Z2VbIMpxCxlffOYk= Received: from blizzard.ozzmosis.com (114-198-63-194.dyn.iinet.net.au [114.198.63.194]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: relay@ozzmosis.com) by homiemail-a43.g.dreamhost.com (Postfix) with ESMTPSA id D70A08C057; Sun, 7 Jun 2015 08:31:32 -0700 (PDT) Received: by blizzard.ozzmosis.com (Postfix, from userid 1001) id 8ED09B65; Mon, 8 Jun 2015 01:31:30 +1000 (AEST) Date: Mon, 8 Jun 2015 01:31:30 +1000 From: andrew clarke To: "A.J. Kehoe IV (Nanoman)" Cc: freebsd-questions@freebsd.org Subject: Re: Custom locale to use ISO 8601 date format Message-ID: <20150607153130.GA80377@ozzmosis.com> References: <20150607085130.GA77300@ozzmosis.com> <20150607144231.GA61785@nanocomputer.nanoman.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150607144231.GA61785@nanocomputer.nanoman.ca> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Jun 2015 15:31:35 -0000 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... ;-) 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. > 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. 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. > 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.