On Sat, Aug 10, 2019 at 01:05:23PM -0700, Paul Eggert wrote:
> > The attached patch-set includes this fix,
> > and the updated NEWS wording.
> > (I'll wait until gnulib is updated with the additional fix,
> > then create a new coreutil patch with the latest gnulib.)
>
> Thanks here too; it all sounds good.

Attached latest version (with updated gnulib, and Bernhard's
syntax-check fix).

I'll push tomorrow unless other issues pop up.

-assaf
>From 961d668eea9c94beddd309d81f65c32a133a3260 Mon Sep 17 00:00:00 2001
From: Assaf Gordon <[email protected]>
Date: Fri, 9 Aug 2019 19:51:42 -0600
Subject: [PATCH 1/3] gnulib: update to latest

---
 gnulib | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnulib b/gnulib
index c7d0b4506..8524167df 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit c7d0b4506574887be5835ae9ae892d365afbb98c
+Subproject commit 8524167df6555c38079e9d041044dc59a9ddbeee
-- 
2.20.1


>From 3cbddd58fde11c911134bdfe79fc3f2579ba58e1 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <[email protected]>
Date: Mon, 22 Jul 2019 08:53:28 +0200
Subject: [PATCH 2/3] maint: add lib/argmatch.h to po/POTFILES.in

* po/POTFILES.in (lib/argmatch.h): Add to avoid sc_po_check error:
    "maint.mk: you have changed the set of files with translatable \
     diagnostics;"
---
 po/POTFILES.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/po/POTFILES.in b/po/POTFILES.in
index 60c5124ac..4231f56c4 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -3,6 +3,7 @@
 
 # These are nominally temporary...
 lib/argmatch.c
+lib/argmatch.h
 lib/closein.c
 lib/closeout.c
 lib/copy-acl.c
-- 
2.20.1


>From 725c8d6bed902a181da867a5d38efd01f62d8c9a Mon Sep 17 00:00:00 2001
From: Assaf Gordon <[email protected]>
Date: Fri, 9 Aug 2019 20:16:06 -0600
Subject: [PATCH 3/3] date: mention military timezone changes from gnulib

Gnulib commits f1f10d47be8762e4ca17c8957a0520b08d28abfb and
0673d8ab42c9bb0cf618a21b537cdd8fb976fb73 negated the meaning of
military timezones parsed in gnu date.
See https://lists.gnu.org/r/bug-gnulib/2019-08/msg00005.html and
https://lists.gnu.org/r/coreutils/2019-08/msg00021.html

* NEWS: Mention this user-visible change.
* tests/misc/date.pl: Add tests for the new behavior.
---
 NEWS               | 13 +++++++++++++
 tests/misc/date.pl | 10 ++++++++++
 2 files changed, 23 insertions(+)

diff --git a/NEWS b/NEWS
index 97c9d18bd..6719e504d 100644
--- a/NEWS
+++ b/NEWS
@@ -49,6 +49,19 @@ GNU coreutils NEWS                                    -*- 
outline -*-
   coherency of file system attributes, useful on network file systems.
 
 
+** Changes in behavior
+
+  date now parses military time zones in accordance with common usage:
+    "A" to "M"  are equivalent to UTC+1 to UTC+12
+    "N" to "Y"  are equivalent to UTC-1 to UTC-12
+    "Z" is "zulu" time (UTC).
+  For example, 'date -d "09:00B" is now equivalent to 9am in UTC+2 time zone.
+  Previously, military time zones were parsed according to the obsolete
+  rfc822, with their value negated (e.g., "B" was equivalent to UTC-2).
+  [The old behavior was introduced in sh-utils 2.0.15 ca. 1999, predating
+  coreutils package.]
+
+
 * Noteworthy changes in release 8.31 (2019-03-10) [stable]
 
 ** Bug fixes
diff --git a/tests/misc/date.pl b/tests/misc/date.pl
index 9ba3d3983..92755b1f2 100755
--- a/tests/misc/date.pl
+++ b/tests/misc/date.pl
@@ -300,6 +300,16 @@ my @Tests =
 
      # https://bugs.gnu.org/34608
      ['date-century-plus', '-d @0 +.%+4C.', {OUT => '.+019.'}],
+
+
+     # Military time zones, new behavior (since 8.32)
+     # https://lists.gnu.org/r/bug-gnulib/2019-08/msg00005.html
+     ['mtz1', '-u -d "09:00B" +%T', {OUT => '07:00:00'}],
+     ['mtz2', '-u -d "09:00L" +%T', {OUT => '22:00:00'}],
+     ['mtz3', '-u -d "09:00N" +%T', {OUT => '10:00:00'}],
+     ['mtz4', '-u -d "09:00T" +%T', {OUT => '16:00:00'}],
+     ['mtz5', '-u -d "09:00X" +%T', {OUT => '20:00:00'}],
+     ['mtz6', '-u -d "09:00Z" +%T', {OUT => '09:00:00'}],
     );
 
 # Repeat the cross-dst test, using Jan 1, 2005 and every interval from 1..364.
-- 
2.20.1

Reply via email to