[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#974911: debian-policy: Date in documentation varies with timezone



Package: debian-policy
Version: 4.5.0.3
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timezone
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

While the Makefile gets a consistent timestamp from debian/changelog,
the date may vary depending on timezone:

  43 	<p>This·is·Debian·Policy·version·4.5.0.3,·released·on·2020-08-19.</p>	43 	<p>This·is·Debian·Policy·version·4.5.0.3,·released·on·2020-08-20.</p>

The attached patch passes the --utc argument to date, to ensure a
consistent date regardless of the timezone of the build process.


Thanks for maintaining debian-policy!


live well,
  vagrant

From 80b4be1a6eeb53ca1e66603efd4c110cbc59d5e4 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Mon, 16 Nov 2020 11:49:16 +0000
Subject: [PATCH] Makefile: Always use UTC date.

While a consistent time was returned, depending on the timezone
the package was built in can cause the date to vary:

  https://reproducible-builds.org/docs/source-date-epoch/
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 5da5b96..5640fb8 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@
 # Basic package information.
 PACKAGE   := $(shell dpkg-parsechangelog -SSource)
 TIMESTAMP := $(shell dpkg-parsechangelog -STimestamp)
-DATE      := $(shell date -d '@$(TIMESTAMP)' +'%Y-%m-%d')
+DATE      := $(shell date --utc -d '@$(TIMESTAMP)' +'%Y-%m-%d')
 VERSION   := $(shell dpkg-parsechangelog -SVersion)
 
 # Translated languages
-- 
2.29.2

Attachment: signature.asc
Description: PGP signature


Reply to: