[Bug 211598] date(1) default format in en_EN locale breaks compatibility with 10.3 and violates POSIX
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Aug 5 14:41:58 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211598
Bug ID: 211598
Summary: date(1) default format in en_EN locale breaks
compatibility with 10.3 and violates POSIX
Product: Base System
Version: 11.0-BETA3
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: standards
Assignee: freebsd-standards at FreeBSD.org
Reporter: Mark.Martinec at ijs.si
Created attachment 173319
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=173319&action=edit
date(1) compatibility matrix
============
(1) 11.0-BETA3 breaks compatibility with 10.3 and other OS,
and violates posix [1](see below, and item (3))
$ LC_ALL=en_US.UTF-8 date
FreeBSD 11.0-BETA3 : (wrong)
Friday, August 5, 2016 at 03:20:25 PM CEST
FreeBSD 10.3-RELEASE-p6 : (ok)
Fri Aug 5 15:15:11 CEST 2016
OSX version 10.9.5 : (ok)
Fri Aug 5 14:57:14 CEST 2016
Fedora Linux 4.6.4-301.fc24.x86_64 : (ok)
Fri Aug 5 15:10:40 CEST 2016
Debian 8.0 / Linux 4.4.16-v7+ : (ok)
Fri Aug 5 15:25:49 CEST 2016
============
(2) missing day of the week name in es_ES locale
$ LC_ALL=es_ES.UTF-8 date
FreeBSD 11.0-BETA3 :
5 de agosto de 2016, 15:20:25 CEST
FreeBSD 10.3-RELEASE-p6 :
viernes, 5 de agosto de 2016, 15:15:11 CEST
============
(3) 11.0 and 10.3 violate Posix [1](see below), which states:
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"
FreeBSD 11.0-BETA3 :
$ LC_ALL=fr_FR.UTF-8 date
vendredi 5 août 2016 15:20:25 CEST
$ LC_ALL=fr_FR.UTF-8 date '+%a %b %e %H:%M:%S %Z %Y'
ven. août 5 15:20:25 CEST 2016
FreeBSD 10.3-RELEASE-p6 :
$ LC_ALL=fr_FR.UTF-8 date
ven 5 aoû 2016 15:15:11 CEST
$ LC_ALL=fr_FR.UTF-8 date '+%a %b %e %H:%M:%S %Z %Y'
ven aoû 5 15:15:11 CEST 2016
OSX version 10.9.5 is similar to FreeBSD 10.3.
Fedora Linux 4.6.4-301.fc24.x86_64 does it right
for most (but not all) locales:
$ LC_ALL=es_ES.UTF-8 date
vie ago 5 15:10:40 CEST 2016
$ LC_ALL=es_ES.UTF-8 date '+%a %b %e %H:%M:%S %Z %Y'
vie ago 5 15:10:40 CEST 2016
Debian 8.0 / Linux 4.4.16-v7+ does it right
for the locales that I have tested (but possibly same as Fedora):
$ LC_ALL=es_ES.UTF-8 date
vie ago 5 15:25:49 CEST 2016
$ LC_ALL=es_ES.UTF-8 date +%a %b %e %H:%M:%S %Z %Y
vie ago 5 15:25:49 CEST 2016
=======================
<ref>[1]</ref>
http://pubs.opengroup.org/onlinepubs/9699919799/
The Open Group Base Specifications Issue 7
IEEE Std 1003.1, 2013 Edition
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"
%a Locale's abbreviated weekday name.
%b Locale's abbreviated month name.
%e Day of the month as a decimal number [1,31] in a
two-digit field with leading <space> character fill.
%Z Timezone name, or no characters if no timezone is determinable.
=======================
Attached is the full report.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-standards
mailing list