From f283bf9632534bec32031fe602f49920ba079d7f Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 15 Apr 2019 10:24:50 -0400 Subject: [PATCH] ... --- MagickCore/timer.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/MagickCore/timer.c b/MagickCore/timer.c index ca2d16bb0..faa113bf2 100644 --- a/MagickCore/timer.c +++ b/MagickCore/timer.c @@ -48,6 +48,7 @@ #include "MagickCore/memory_.h" #include "MagickCore/memory-private.h" #include "MagickCore/nt-base-private.h" +#include "MagickCore/string-private.h" #include "MagickCore/timer.h" #include "MagickCore/timer-private.h" @@ -357,6 +358,18 @@ MagickExport double GetElapsedTime(TimerInfo *time_info) */ MagickPrivate time_t GetMagickTime(void) { + char + *source_date_epoch = getenv("SOURCE_DATE_EPOCH"); + + if (source_date_epoch != (char *) NULL) + { + time_t + epoch; + + epoch=(time_t) StringToDouble(source_date_epoch,(char **) NULL); + if ((epoch > 0) && (epoch <= time((time_t *) NULL))) + return(epoch); + } return(time((time_t *) NULL)); } -- 2.40.0