From 1f1354fc1e5098a61bcc62d556db2b9549056d3f Mon Sep 17 00:00:00 2001 From: Chris Lamb Date: Thu, 11 Jan 2018 22:45:24 +0530 Subject: [PATCH 19/39] Please make CDBISDN_DATE ignore timezone. Whilst working on the Reproducible Builds effort [0], we noticed that hwinfo could not be built reproducibly. Whilst it uses SOURCE_DATE_EPOCH, it varies depending on the timezone via ctime(&t) instead of asctime(gmtime(&t)). [0] https://reproducible-builds.org/ Signed-off-by: Chris Lamb --- src/isdn/cdb/isdn_cdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/isdn/cdb/isdn_cdb.c b/src/isdn/cdb/isdn_cdb.c index 53c3c75..95a239c 100644 --- a/src/isdn/cdb/isdn_cdb.c +++ b/src/isdn/cdb/isdn_cdb.c @@ -222,7 +222,7 @@ char **argv; fprintf(stdout, "/* CDBISDN database */\n"); fprintf(stdout,"const int CDBISDN_DBVERSION = 0x%x;\n", CDB_DATAVERSION); time(&tim); - strcpy(line,ctime(&tim)); + strcpy(line,asctime(gmtime(&tim))); l = strlen(line); if (l) line[l-1] = 0; -- 1.8.3.1