From 09e452b62a82845736e638eecd762a911d95a349 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Tue, 20 Mar 2018 14:33:56 +0100 Subject: tests: Set timezone in "schedule.sh" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously the test environment was implicitly expecting the current timezone to be UTC+1. * tests/schedule.sh: Set TZ environment variable to 'UTC0'. Update expected result. Reported-by: Ludovic Courtès --- tests/schedule.sh | 47 ++++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) (limited to 'tests/schedule.sh') diff --git a/tests/schedule.sh b/tests/schedule.sh index ad267c4..5ea79e5 100644 --- a/tests/schedule.sh +++ b/tests/schedule.sh @@ -1,5 +1,5 @@ # schedule.sh -- Check mcron schedule output -# Copyright © 2017 Mathieu Lirzin +# Copyright © 2017, 2018 Mathieu Lirzin # # This file is part of GNU Mcron. # @@ -18,9 +18,14 @@ source "${srcdir}/tests/init.sh" +# Use UTC and SOURCE_DATE_EPOCH to get reproducible result. + SOURCE_DATE_EPOCH=1 export SOURCE_DATE_EPOCH +TZ=UTC0 +export TZ + # Use current working directory to store mcron files XDG_CONFIG_HOME=`pwd` export XDG_CONFIG_HOME @@ -35,83 +40,83 @@ cat > cron/bar.guile < expected <