From d822e6a61b71356b4f1bebef4d79aad50fc44c05 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Fri, 20 Dec 2019 17:37:32 -0800
Subject: [PATCH] tests: Ensure UTC for Texinfo @UPDATED@ test

* t/txinfo-vtexi4.sh: TZ=UTC0; export TZ (same as mdate-sh).
* NEWS: update.
---
 NEWS               | 3 +++
 t/txinfo-vtexi4.sh | 6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 9bf332b..48ca69f 100644
--- a/NEWS
+++ b/NEWS
@@ -83,6 +83,9 @@ New in ?.?.?:
   - For make tags, lisp_LISP is followed by the necessary space when
     used with CONFIG_HEADERS.
     (automake bug#38139)
+  
+  - The automake test txinfo-vtexi4.sh no longer fails when localtime
+    and UTC cross a day boundary.
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
diff --git a/t/txinfo-vtexi4.sh b/t/txinfo-vtexi4.sh
index 76533ef..976d41e 100644
--- a/t/txinfo-vtexi4.sh
+++ b/t/txinfo-vtexi4.sh
@@ -17,13 +17,17 @@
 # Check that the version.texi file is automatically created and distributed
 # if @included into a texi source.  Also check that is correctly defined
 # @values definitions it is advertised to.
-# See also the related test 'txinfo-vtexi4.sh', which does similar checks,
+# See also the related test 'txinfo-vtexi3.sh', which does similar checks,
 # but for more vers*.texi files, and does not require makeinfo, tex and
 # texi2dvi.
 
 required='makeinfo tex texi2dvi grep-nonprint'
 . test-init.sh
 
+# We must use UTC since mdate-sh does, else the UPDATED values might
+# differ depending on local time.
+TZ=UTC0; export TZ
+
 test $(LC_ALL=C date '+%u') -gt 0 && test $(LC_ALL=C date '+%u') -lt 8 \
   && day=$(LC_ALL=C date '+%d')   && test -n "$day" \
   && month=$(LC_ALL=C date '+%B') && test -n "$month" \
-- 
1.8.3.1

