Module Name:    src
Committed By:   christos
Date:           Thu Nov 16 18:06:05 UTC 2023

Modified Files:
        src/distrib/notes: Makefile.inc

Log Message:
Set the timezone too when invoking date with a timestamp because it can
be affected too:
$ env TZ=UTC date -r 1700157305
Thu Nov 16 17:55:05 UTC 2023
$ env TZ=UTC24:24:24 date -r 1700157305
Wed Nov 15 17:30:41 UTC 2023


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/distrib/notes/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/notes/Makefile.inc
diff -u src/distrib/notes/Makefile.inc:1.58 src/distrib/notes/Makefile.inc:1.59
--- src/distrib/notes/Makefile.inc:1.58	Mon Nov 13 16:01:51 2023
+++ src/distrib/notes/Makefile.inc	Thu Nov 16 13:06:05 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.58 2023/11/13 21:01:51 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.59 2023/11/16 18:06:05 christos Exp $
 #
 
 # Ross Harvey <r...@netbsd.org>
@@ -59,12 +59,12 @@ PRESET+=	-rnextminor=${nextmin}
 .endif
 .endif
 .if defined(BUILDID) && "${BUILDID:M20*Z}" != ""
-curdate!=	env LANG="C" ${TOOL_DATE} -d "${BUILDID:C/[0-9][0-9][0-9][0-9]Z$//}" "+%b %d, %Y"
+curdate!=	env LANG="C" TZ="UTC" ${TOOL_DATE} -d "${BUILDID:C/[0-9][0-9][0-9][0-9]Z$//}" "+%b %d, %Y"
 .else
 .if ${NETBSD_OFFICIAL_RELEASE:Uno} == "yes"
 .error "No release date could be derived from BUILDID"
 .else
-curdate!=	env LANG="C" ${TOOL_DATE} ${DATE_TIMESTAMP} "+%b %d, %Y"
+curdate!=	env LANG="C" TZ="UTC" ${TOOL_DATE} ${DATE_TIMESTAMP} "+%b %d, %Y"
 .endif
 .endif
 PRESET+=	-dcur_date="${curdate}"

Reply via email to