From owner-freebsd-current@freebsd.org Sun Aug 7 00:31:38 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F4D9BAFB39 for ; Sun, 7 Aug 2016 00:31:38 +0000 (UTC) (envelope-from Mark.Martinec+freebsd@ijs.si) Received: from mail.ijs.si (mail.ijs.si [IPv6:2001:1470:ff80::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E92419D5 for ; Sun, 7 Aug 2016 00:31:37 +0000 (UTC) (envelope-from Mark.Martinec+freebsd@ijs.si) Received: from amavis-ori.ijs.si (localhost [IPv6:::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.ijs.si (Postfix) with ESMTPS id 3s6M121SHPzZJ for ; Sun, 7 Aug 2016 02:31:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ijs.si; h= user-agent:message-id:references:in-reply-to:organization :subject:subject:from:from:date:date:content-transfer-encoding :content-type:content-type:mime-version:received:received :received:received; s=jakla4; t=1470529890; x=1473121891; bh=7e4 8SbdDFaYtYZ8SfVs0kX5cy+exSubcYv9eTVEsoh0=; b=OXmhbpzgfXg8IC04iSS 4c4fZZM52WVPJHt0YGEZaftsfJ4scCYdgjfHsQynxjeDbpODddjHMMXED0xqLtXS XPxKqyXfp6GMUHPEO2fHQZUQoCGCYE3SXUojenFwu+5ydiJ6TNT5vztTsFjq5m7A BOQVXDoPcwPw41J/AF9Td4TA= X-Virus-Scanned: amavisd-new at ijs.si Received: from mail.ijs.si ([IPv6:::1]) by amavis-ori.ijs.si (mail.ijs.si [IPv6:::1]) (amavisd-new, port 10026) with LMTP id XGvvutziLJdX for ; Sun, 7 Aug 2016 02:31:30 +0200 (CEST) Received: from mildred.ijs.si (mailbox.ijs.si [IPv6:2001:1470:ff80::143:1]) by mail.ijs.si (Postfix) with ESMTP id 3s6M0y5CmDzZH for ; Sun, 7 Aug 2016 02:31:30 +0200 (CEST) Received: from nabiralnik.ijs.si (nabiralnik.ijs.si [IPv6:2001:1470:ff80::80:16]) by mildred.ijs.si (Postfix) with ESMTP id 3s6M0y2QFhz1S9 for ; Sun, 7 Aug 2016 02:31:30 +0200 (CEST) Received: from sleepy.ijs.si (2001:1470:ff80:e001::1:1) by webmail.ijs.si with HTTP (HTTP/1.1 POST); Sun, 07 Aug 2016 02:31:30 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Sun, 07 Aug 2016 02:31:30 +0200 From: Mark Martinec To: freebsd-current@freebsd.org Subject: Re: date(1) default format changed between 10.3 and 11.0-BETA3 Organization: Jozef Stefan Institute In-Reply-To: <3b68be24-7ec8-08be-53f4-a4b088840c35@freebsd.org> References: <3629a441-ee6d-2407-fa13-5ebd8db8d802@freebsd.org> <000c29ee0f3dbd1d433c565023d69e25@mailbox.ijs.si> <279e9b67-da23-cdd6-3a77-b084ad8269eb@freebsd.org> <4a454eef-55ae-b90d-4441-2aa9708fc747@freebsd.org> <20160806041536.GL86883@eureka.lemis.com> <20160806100053.5fpf27pcgona7czp@ivaldir.etoilebsd.net> <3b68be24-7ec8-08be-53f4-a4b088840c35@freebsd.org> Message-ID: <745900399560cd03077ffb3afa5a35cd@mailbox.ijs.si> X-Sender: Mark.Martinec+freebsd@ijs.si User-Agent: Roundcube Webmail/1.2.0 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Aug 2016 00:31:38 -0000 On 2016-08-06 21:08, Julian Elischer wrote: > On 6/08/2016 11:09 PM, Benjamin Kaduk wrote: >> On Sat, 6 Aug 2016, Baptiste Daroussin wrote: >>> On Sat, Aug 06, 2016 at 02:15:36PM +1000, Greg 'groggy' Lehey wrote: >>>> On Friday, 5 August 2016 at 18:56:33 +0300, Andrey A. Chernov >>>> wrote: >>>>> On 05.08.2016 18:44, Mark Martinec wrote: >>>>>> On 2016-08-05 17:23, Andrey Chernov wrote: >>>>>> >>>>>> POSIX does say that the default format should be the same >>>>>> as with "+%a %b %e %H:%M:%S %Z %Y". >>>>>> It also says that %a and %b are locale's abbreviated names. >>>>> It is true for _POSIX_ locale only, as I already say. en_US.* is >>>>> not >>>>> POSIX or C locale. >>>> It still violates POLA. >>>> >>> I really do not think that it violates POLA fiven that the behaviour >>> you are >>> expecting is still available in the default configurtion that is >>> still POSIX. >> Regardless, at a new major release is precisely when it is permissible >> to >> break POLA. > switching from short form to long form is more than a POLA.. short > form has a specific fixed layout > and feeding a long form string into it will break things. >> >>> Set LC_TIME to C and then you are back on your behaviour (and this is >>> the >>> default when you install FreeBSD). >>> >>> locales should be seen as tzdata for exemple, they are a moving >>> target >>> complicated to handle for every locale we do support: 78 for >>> 11.0-RELEASE and >>> 193 if we do count the encoding variants. locales are updated very >>> often (for >>> exemple cldr unicode make a new release of the data every 8 month or >>> so) >> As I understand it, your change will improve the maintainability of >> locales in FreeBSD in the future, which justifies a POLA break at the >> release boundary. >> -Ben $ LC_ALL=en_US.UTF-8 date FreeBSD 11.0-BETA3 : Friday, August 5, 2016 at 03:20:25 PM CEST FreeBSD 10.3-RELEASE-p6 : Fri Aug 5 15:15:11 CEST 2016 OSX version 10.9.5 : Fri Aug 5 14:57:14 CEST 2016 Fedora Linux 4.6.4-301.fc24.x86_64 : Fri Aug 5 15:10:40 CEST 2016 Debian 8.0 / Linux 4.4.16-v7+ : Fri Aug 5 15:25:49 CEST 2016 It's not just long vs. short forms of a name, it is also the order of fields, their separators, and a 12/24h time form that is different from everyone else and from what we used to have in 10.3. Is it really worth being different? I wonder how many ad-hoc scripts will break. Although as Andrey Chernov correctly noted that the date(1) specs in The Open Group Base Specifications Issue 7 IEEE Std 1003.1, 2013 Edition ( http://pubs.opengroup.org/onlinepubs/9699919799/utilities/date.html ) says that the default format applies to POSIX locale only: STDOUT When no formatting operand is specified, the output in the POSIX locale shall be equivalent to specifying: date "+%a %b %e %H:%M:%S %Z %Y" imo, unless there is a very good reason not to, the above default format should be applicable to most locales, but at least to English spoken locales. The explicit locale-dependency of %a, %b, and %Z conversion specifications already takes care of most locale-specific idiosyncrasies. Mark