Commit f283bf96 authored by Cristy's avatar Cristy

...

parent c0ba05d9
......@@ -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));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment