Commit edd02d2e authored by Cristy's avatar Cristy

...

parent f69d8226
......@@ -212,6 +212,7 @@ MAGICKCORE_BASE_SRCS = \
MagickCore/pixel-private.h \
MagickCore/policy.c \
MagickCore/policy.h \
MagickCore/policy-private.h \
MagickCore/prepress.c \
MagickCore/prepress.h \
MagickCore/property.c \
......@@ -268,6 +269,7 @@ MAGICKCORE_BASE_SRCS = \
MagickCore/thread-private.h \
MagickCore/timer.c \
MagickCore/timer.h \
MagickCore/timer-private.h \
MagickCore/token.c \
MagickCore/token.h \
MagickCore/token-private.h \
......@@ -467,6 +469,7 @@ MAGICKCORE_NOINST_HDRS = \
MagickCore/string-private.h \
MagickCore/thread_.h \
MagickCore/thread-private.h \
MagickCore/timer-private.h \
MagickCore/token-private.h \
MagickCore/transform-private.h \
MagickCore/type-private.h \
......
......@@ -67,6 +67,7 @@
#include "MagickCore/resource_.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/timer-private.h"
#include "MagickCore/transform.h"
#include "MagickCore/utility.h"
#include "MagickCore/utility-private.h"
......@@ -2173,10 +2174,10 @@ MagickExport Image *XAnimateImages(Display *display,
/*
Handle a window event.
*/
timestamp=time((time_t *) NULL);
timestamp=GetMagickTime();
(void) XNextEvent(display,&event);
if (windows->image.stasis == MagickFalse)
windows->image.stasis=(time((time_t *) NULL)-timestamp) > 0 ?
windows->image.stasis=(GetMagickTime()-timestamp) > 0 ?
MagickTrue : MagickFalse;
if (event.xany.window == windows->command.id)
{
......
......@@ -68,6 +68,7 @@
#include "MagickCore/semaphore.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/timer-private.h"
#include "MagickCore/token.h"
#include "MagickCore/utility.h"
#include "MagickCore/utility-private.h"
......@@ -1736,7 +1737,7 @@ MagickExport void GetBlobInfo(BlobInfo *blob_info)
(void) memset(blob_info,0,sizeof(*blob_info));
blob_info->type=UndefinedStream;
blob_info->quantum=(size_t) MagickMaxBlobExtent;
blob_info->properties.st_mtime=time((time_t *) NULL);
blob_info->properties.st_mtime=GetMagickTime();
blob_info->properties.st_ctime=blob_info->properties.st_mtime;
blob_info->debug=IsEventLogging();
blob_info->reference_count=1;
......
......@@ -70,6 +70,7 @@
#include "MagickCore/splay-tree.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/timer-private.h"
#include "MagickCore/thread-private.h"
#include "MagickCore/utility.h"
#include "MagickCore/utility-private.h"
......@@ -1681,10 +1682,10 @@ static Cache GetImagePixelCache(Image *image,const MagickBooleanType clone,
Set the expire time in seconds.
*/
cache_timelimit=GetMagickResourceLimit(TimeResource);
cache_epoch=time((time_t *) NULL);
cache_epoch=GetMagickTime();
}
if ((cache_timelimit != MagickResourceInfinity) &&
((MagickSizeType) (time((time_t *) NULL)-cache_epoch) >= cache_timelimit))
((MagickSizeType) (GetMagickTime()-cache_epoch) >= cache_timelimit))
{
#if defined(ECANCELED)
errno=ECANCELED;
......
......@@ -87,6 +87,7 @@
#include "MagickCore/statistic.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/timer-private.h"
#include "MagickCore/transform.h"
#include "MagickCore/transform-private.h"
#include "MagickCore/threshold.h"
......@@ -15073,7 +15074,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
Respond to events.
*/
delay=display_image->delay/MagickMax(display_image->ticks_per_second,1L);
timer=time((time_t *) NULL)+(delay == 0 ? 1 : delay)+1;
timer=GetMagickTime()+(delay == 0 ? 1 : delay)+1;
update_time=0;
if (resource_info->update != MagickFalse )
{
......@@ -15098,7 +15099,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
if (windows->image.mapped != MagickFalse )
if ((display_image->delay != 0) || (resource_info->update != 0))
{
if (timer < time((time_t *) NULL))
if (timer < GetMagickTime())
{
if (resource_info->update == MagickFalse)
*state|=NextImageState | ExitState;
......@@ -15127,7 +15128,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
}
delay=display_image->delay/MagickMax(
display_image->ticks_per_second,1L);
timer=time((time_t *) NULL)+(delay == 0 ? 1 : delay)+1;
timer=GetMagickTime()+(delay == 0 ? 1 : delay)+1;
}
}
if (XEventsQueued(display,QueuedAfterFlush) == 0)
......@@ -15139,12 +15140,12 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
continue;
}
}
timestamp=time((time_t *) NULL);
timestamp=GetMagickTime();
(void) XNextEvent(display,&event);
if ((windows->image.stasis == MagickFalse) ||
(windows->magnify.stasis == MagickFalse))
{
if ((time((time_t *) NULL)-timestamp) > 0)
if ((GetMagickTime()-timestamp) > 0)
{
windows->image.stasis=MagickTrue;
windows->magnify.stasis=MagickTrue;
......@@ -15371,7 +15372,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
}
delay=display_image->delay/MagickMax(display_image->ticks_per_second,
1L);
timer=time((time_t *) NULL)+(delay == 0 ? 1 : delay)+1;
timer=GetMagickTime()+(delay == 0 ? 1 : delay)+1;
break;
}
case ButtonRelease:
......@@ -15763,7 +15764,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
XRefreshWindow(display,&windows->image,&event);
delay=display_image->delay/MagickMax(
display_image->ticks_per_second,1L);
timer=time((time_t *) NULL)+(delay == 0 ? 1 : delay)+1;
timer=GetMagickTime()+(delay == 0 ? 1 : delay)+1;
break;
}
if ((event.xexpose.window == windows->magnify.id) &&
......@@ -15824,7 +15825,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
}
delay=display_image->delay/MagickMax(
display_image->ticks_per_second,1L);
timer=time((time_t *) NULL)+(delay == 0 ? 1 : delay)+1;
timer=GetMagickTime()+(delay == 0 ? 1 : delay)+1;
break;
}
case KeyRelease:
......
......@@ -96,6 +96,7 @@
#include "MagickCore/thread-private.h"
#include "MagickCore/threshold.h"
#include "MagickCore/timer.h"
#include "MagickCore/timer-private.h"
#include "MagickCore/token.h"
#include "MagickCore/token-private.h"
#include "MagickCore/utility.h"
......@@ -207,7 +208,7 @@ MagickExport Image *AcquireImage(const ImageInfo *image_info,
image->channel_mask=DefaultChannels;
image->channel_map=AcquirePixelChannelMap();
image->blob=CloneBlobInfo((BlobInfo *) NULL);
image->timestamp=time((time_t *) NULL);
image->timestamp=GetMagickTime();
image->debug=IsEventLogging();
image->reference_count=1;
image->semaphore=AcquireSemaphoreInfo();
......
......@@ -57,9 +57,10 @@
#include "MagickCore/timer.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/token.h"
#include "MagickCore/thread_.h"
#include "MagickCore/thread-private.h"
#include "MagickCore/timer-private.h"
#include "MagickCore/token.h"
#include "MagickCore/utility.h"
#include "MagickCore/utility-private.h"
#include "MagickCore/version.h"
......@@ -975,7 +976,7 @@ static char *TranslateEvent(const char *module,const char *function,
exception=AcquireExceptionInfo();
log_info=(LogInfo *) GetLogInfo("*",exception);
exception=DestroyExceptionInfo(exception);
seconds=time((time_t *) NULL);
seconds=GetMagickTime();
elapsed_time=GetElapsedTime(&log_info->timer);
user_time=GetUserTime(&log_info->timer);
text=AcquireString(event);
......
......@@ -13,7 +13,7 @@
See the License for the specific language governing permissions and
limitations under the License.
MagickCore private image color methods.
MagickCore private policy methods.
*/
#ifndef MAGICKCORE_POLICY_PRIVATE_H
#define MAGICKCORE_POLICY_PRIVATE_H
......
......@@ -53,6 +53,7 @@
#include "MagickCore/signature.h"
#include "MagickCore/signature-private.h"
#include "MagickCore/string_.h"
#include "MagickCore/timer-private.h"
/*
Define declarations.
*/
......@@ -138,7 +139,7 @@ MagickPrivate SignatureInfo *AcquireSignatureInfo(void)
lsb_first=1;
signature_info->lsb_first=(int) (*(char *) &lsb_first) == 1 ? MagickTrue :
MagickFalse;
signature_info->timestamp=(ssize_t) time((time_t *) NULL);
signature_info->timestamp=(ssize_t) GetMagickTime();
signature_info->signature=MagickCoreSignature;
InitializeSignature(signature_info);
return(signature_info);
......
......@@ -1156,86 +1156,6 @@ MagickExport ssize_t FormatMagickSize(const MagickSizeType size,
return(count);
}
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% F o r m a t M a g i c k T i m e %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% FormatMagickTime() returns the specified time in the Internet date/time
% format and the length of the timestamp.
%
% The format of the FormatMagickTime method is:
%
% ssize_t FormatMagickTime(const time_t time,const size_t length,
% char *timestamp)
%
% A description of each parameter follows.
%
% o time: the time since the Epoch (00:00:00 UTC, January 1, 1970),
% measured in seconds.
%
% o length: the maximum length of the string.
%
% o timestamp: Return the Internet date/time here.
%
*/
MagickExport ssize_t FormatMagickTime(const time_t time,const size_t length,
char *timestamp)
{
ssize_t
count;
struct tm
gm_time,
local_time;
time_t
timezone;
assert(timestamp != (char *) NULL);
(void) memset(&local_time,0,sizeof(local_time));
(void) memset(&gm_time,0,sizeof(gm_time));
#if defined(MAGICKCORE_HAVE_LOCALTIME_R)
(void) localtime_r(&time,&local_time);
#else
{
struct tm
*my_time;
my_time=localtime(&time);
if (my_time != (struct tm *) NULL)
(void) memcpy(&local_time,my_time,sizeof(local_time));
}
#endif
#if defined(MAGICKCORE_HAVE_GMTIME_R)
(void) gmtime_r(&time,&gm_time);
#else
{
struct tm
*my_time;
my_time=gmtime(&time);
if (my_time != (struct tm *) NULL)
(void) memcpy(&gm_time,my_time,sizeof(gm_time));
}
#endif
timezone=(time_t) ((local_time.tm_min-gm_time.tm_min)/60+
local_time.tm_hour-gm_time.tm_hour+24*((local_time.tm_year-
gm_time.tm_year) != 0 ? (local_time.tm_year-gm_time.tm_year) :
(local_time.tm_yday-gm_time.tm_yday)));
count=FormatLocaleString(timestamp,length,
"%04d-%02d-%02dT%02d:%02d:%02d%+03ld:00",local_time.tm_year+1900,
local_time.tm_mon+1,local_time.tm_mday,local_time.tm_hour,
local_time.tm_min,local_time.tm_sec,(long) timezone);
return(count);
}
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
......
......@@ -83,8 +83,7 @@ extern MagickExport size_t
extern MagickExport ssize_t
FormatMagickSize(const MagickSizeType,const MagickBooleanType,const char *,
const size_t,char *),
FormatMagickTime(const time_t,const size_t,char *);
const size_t,char *);
extern MagickExport StringInfo
*AcquireStringInfo(const size_t),
......
......@@ -43,11 +43,13 @@
#include "MagickCore/studio.h"
#include "MagickCore/exception.h"
#include "MagickCore/exception-private.h"
#include "MagickCore/locale_.h"
#include "MagickCore/log.h"
#include "MagickCore/memory_.h"
#include "MagickCore/memory-private.h"
#include "MagickCore/nt-base-private.h"
#include "MagickCore/timer.h"
#include "MagickCore/timer-private.h"
/*
Define declarations.
......@@ -220,6 +222,86 @@ static double ElapsedTime(void)
#endif
}
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% F o r m a t M a g i c k T i m e %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% FormatMagickTime() returns the specified time in the Internet date/time
% format and the length of the timestamp.
%
% The format of the FormatMagickTime method is:
%
% ssize_t FormatMagickTime(const time_t time,const size_t length,
% char *timestamp)
%
% A description of each parameter follows.
%
% o time: the time since the Epoch (00:00:00 UTC, January 1, 1970),
% measured in seconds.
%
% o length: the maximum length of the string.
%
% o timestamp: Return the Internet date/time here.
%
*/
MagickExport ssize_t FormatMagickTime(const time_t time,const size_t length,
char *timestamp)
{
ssize_t
count;
struct tm
gm_time,
local_time;
time_t
timezone;
assert(timestamp != (char *) NULL);
(void) memset(&local_time,0,sizeof(local_time));
(void) memset(&gm_time,0,sizeof(gm_time));
#if defined(MAGICKCORE_HAVE_LOCALTIME_R)
(void) localtime_r(&time,&local_time);
#else
{
struct tm
*my_time;
my_time=localtime(&time);
if (my_time != (struct tm *) NULL)
(void) memcpy(&local_time,my_time,sizeof(local_time));
}
#endif
#if defined(MAGICKCORE_HAVE_GMTIME_R)
(void) gmtime_r(&time,&gm_time);
#else
{
struct tm
*my_time;
my_time=gmtime(&time);
if (my_time != (struct tm *) NULL)
(void) memcpy(&gm_time,my_time,sizeof(gm_time));
}
#endif
timezone=(time_t) ((local_time.tm_min-gm_time.tm_min)/60+
local_time.tm_hour-gm_time.tm_hour+24*((local_time.tm_year-
gm_time.tm_year) != 0 ? (local_time.tm_year-gm_time.tm_year) :
(local_time.tm_yday-gm_time.tm_yday)));
count=FormatLocaleString(timestamp,length,
"%04d-%02d-%02dT%02d:%02d:%02d%+03ld:00",local_time.tm_year+1900,
local_time.tm_mon+1,local_time.tm_mday,local_time.tm_hour,
local_time.tm_min,local_time.tm_sec,(long) timezone);
return(count);
}
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
......@@ -255,6 +337,29 @@ MagickExport double GetElapsedTime(TimerInfo *time_info)
return(time_info->elapsed.total);
}
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
% G e t M a g i c k T i m e %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% GetMagickTime() returns the time as the number of seconds since the Epoch.
%
% The format of the GetElapsedTime method is:
%
% time_t GetElapsedTime(void)
%
*/
MagickPrivate time_t GetMagickTime(void)
{
return(time((time_t *) NULL));
}
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
......
......@@ -57,6 +57,9 @@ extern MagickExport double
extern MagickExport MagickBooleanType
ContinueTimer(TimerInfo *);
extern MagickExport ssize_t
FormatMagickTime(const time_t,const size_t,char *);
extern MagickExport TimerInfo
*AcquireTimerInfo(void),
*DestroyTimerInfo(TimerInfo *);
......
......@@ -49,6 +49,7 @@
#include "MagickCore/magick.h"
#include "MagickCore/memory_.h"
#include "MagickCore/string_.h"
#include "MagickCore/timer-private.h"
#include "MagickCore/token.h"
#include "MagickCore/token-private.h"
#include "MagickCore/utility.h"
......@@ -8188,11 +8189,11 @@ MagickPrivate void XNoticeWidget(Display *display,XWindows *windows,
/*
Respond to X events.
*/
timer=time((time_t *) NULL)+Timeout;
timer=GetMagickTime()+Timeout;
state=UpdateConfigurationState;
do
{
if (time((time_t *) NULL) > timer)
if (GetMagickTime() > timer)
break;
if (state & UpdateConfigurationState)
{
......
......@@ -48,13 +48,14 @@
#include "MagickWand/MagickWand.h"
#include "MagickWand/magick-wand-private.h"
#include "MagickWand/mogrify-private.h"
#include "MagickCore/blob-private.h"
#include "MagickCore/composite-private.h"
#include "MagickCore/image-private.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/string-private.h"
#include "MagickCore/thread-private.h"
#include "MagickCore/timer-private.h"
#include "MagickCore/utility-private.h"
#include "MagickCore/blob-private.h"
#if defined(MAGICKCORE_HAVE_UTIME_H)
#include <utime.h>
#endif
......@@ -7483,7 +7484,7 @@ WandExport MagickBooleanType MogrifyImageInfo(ImageInfo *image_info,
if (*option == '+')
{
seed=(unsigned long) time((time_t *) NULL);
seed=(unsigned long) GetMagickTime();
SetRandomSecretKey(seed);
break;
}
......
......@@ -61,6 +61,7 @@
#include "MagickCore/pixel-private.h"
#include "MagickCore/string-private.h"
#include "MagickCore/thread-private.h"
#include "MagickCore/timer-private.h"
/*
Constant declaration.
......@@ -1334,7 +1335,7 @@ WandPrivate void CLISettingOptionInfo(MagickCLI *cli_wand,
CLIWandExceptArgBreak(OptionError,"InvalidArgument",option,arg1);
SetRandomSecretKey(
IfSetOption ? (unsigned long) StringToUnsignedLong(arg1)
: (unsigned long) time((time_t *) NULL) );
: (unsigned long) GetMagickTime() );
break;
}
if (LocaleCompare("size",option+1) == 0)
......
......@@ -480,7 +480,8 @@ am__MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_SOURC
MagickCore/option-private.h MagickCore/paint.c \
MagickCore/paint.h MagickCore/pixel.c MagickCore/pixel.h \
MagickCore/pixel-accessor.h MagickCore/pixel-private.h \
MagickCore/policy.c MagickCore/policy.h MagickCore/prepress.c \
MagickCore/policy.c MagickCore/policy.h \
MagickCore/policy-private.h MagickCore/prepress.c \
MagickCore/prepress.h MagickCore/property.c \
MagickCore/property.h MagickCore/profile.c \
MagickCore/profile.h MagickCore/profile-private.h \
......@@ -506,7 +507,8 @@ am__MagickCore_libMagickCore_@MAGICK_MAJOR_VERSION@_@MAGICK_ABI_SUFFIX@_la_SOURC
MagickCore/string_.h MagickCore/string-private.h \
MagickCore/studio.h MagickCore/thread.c MagickCore/thread_.h \
MagickCore/thread-private.h MagickCore/timer.c \
MagickCore/timer.h MagickCore/token.c MagickCore/token.h \
MagickCore/timer.h MagickCore/timer-private.h \
MagickCore/token.c MagickCore/token.h \
MagickCore/token-private.h MagickCore/transform.c \
MagickCore/transform.h MagickCore/threshold.c \
MagickCore/threshold.h MagickCore/type.c MagickCore/type.h \
......@@ -4910,6 +4912,7 @@ MAGICKCORE_BASE_SRCS = \
MagickCore/pixel-private.h \
MagickCore/policy.c \
MagickCore/policy.h \
MagickCore/policy-private.h \
MagickCore/prepress.c \
MagickCore/prepress.h \
MagickCore/property.c \
......@@ -4966,6 +4969,7 @@ MAGICKCORE_BASE_SRCS = \
MagickCore/thread-private.h \
MagickCore/timer.c \
MagickCore/timer.h \
MagickCore/timer-private.h \
MagickCore/token.c \
MagickCore/token.h \
MagickCore/token-private.h \
......@@ -5160,6 +5164,7 @@ MAGICKCORE_NOINST_HDRS = \
MagickCore/string-private.h \
MagickCore/thread_.h \
MagickCore/thread-private.h \
MagickCore/timer-private.h \
MagickCore/token-private.h \
MagickCore/transform-private.h \
MagickCore/type-private.h \
......@@ -59,6 +59,7 @@
#include "MagickCore/list.h"
#include "MagickCore/magick.h"
#include "MagickCore/memory_.h"
#include "MagickCore/module.h"
#include "MagickCore/monitor.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/option.h"
......@@ -69,7 +70,7 @@
#include "MagickCore/static.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/module.h"
#include "MagickCore/timer-private.h"
/*
Typedef declaration.
......@@ -990,7 +991,7 @@ static MagickBooleanType WriteCINImage(const ImageInfo *image_info,Image *image,
sizeof(cin.file.filename));
offset+=WriteBlob(image,sizeof(cin.file.filename),(unsigned char *)
cin.file.filename);
seconds=time((time_t *) NULL);
seconds=GetMagickTime();
#if defined(MAGICKCORE_HAVE_LOCALTIME_R)
(void) localtime_r(&seconds,&local_time);
#else
......@@ -1093,7 +1094,7 @@ static MagickBooleanType WriteCINImage(const ImageInfo *image_info,Image *image,
sizeof(cin.origination.filename));
offset+=WriteBlob(image,sizeof(cin.origination.filename),(unsigned char *)
cin.origination.filename);
seconds=time((time_t *) NULL);
seconds=GetMagickTime();
(void) memset(timestamp,0,sizeof(timestamp));
(void) strftime(timestamp,MagickPathExtent,"%Y:%m:%d:%H:%M:%S%Z",&local_time);
(void) memset(cin.origination.create_date,0,
......
......@@ -65,6 +65,7 @@
#include "MagickCore/static.h"
#include "MagickCore/string_.h"
#include "MagickCore/string-private.h"
#include "MagickCore/timer-private.h"
/*
Define declaration.
......@@ -1587,7 +1588,7 @@ static MagickBooleanType WriteDPXImage(const ImageInfo *image_info,Image *image,
(void) strncpy(dpx.file.filename,value,sizeof(dpx.file.filename)-1);
offset+=WriteBlob(image,sizeof(dpx.file.filename),(unsigned char *)
dpx.file.filename);
seconds=time((time_t *) NULL);
seconds=GetMagickTime();
(void) FormatMagickTime(seconds,sizeof(dpx.file.timestamp),
dpx.file.timestamp);
offset+=WriteBlob(image,sizeof(dpx.file.timestamp),(unsigned char *)
......
......@@ -74,6 +74,7 @@
#include "MagickCore/static.h"
#include "MagickCore/string_.h"
#include "MagickCore/module.h"
#include "MagickCore/timer-private.h"
#include "MagickCore/transform.h"
#include "MagickCore/utility-private.h"
#if defined(MAGICKCORE_ZLIB_DELEGATE)
......@@ -1605,7 +1606,7 @@ static MagickBooleanType WriteMATImage(const ImageInfo *image_info,Image *image,
return(MagickFalse);
image->depth=8;
current_time=time((time_t *) NULL);
current_time=GetMagickTime();
#if defined(MAGICKCORE_HAVE_LOCALTIME_R)
(void) localtime_r(&current_time,&local_time);
#else
......
......@@ -64,6 +64,7 @@
#include "MagickCore/list.h"
#include "MagickCore/magick.h"
#include "MagickCore/memory_.h"
#include "MagickCore/module.h"
#include "MagickCore/monitor.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/pixel-accessor.h"
......@@ -72,7 +73,7 @@
#include "MagickCore/quantum-private.h"
#include "MagickCore/static.h"
#include "MagickCore/string_.h"
#include "MagickCore/module.h"
#include "MagickCore/timer-private.h"
#include "MagickCore/utility.h"
/*
......@@ -815,7 +816,7 @@ static MagickBooleanType WritePDBImage(const ImageInfo *image_info,Image *image,
(void) CopyMagickString(pdb_info.name,filename,sizeof(pdb_info.name));
pdb_info.attributes=0;
pdb_info.version=0;
pdb_info.create_time=time((time_t *) NULL);
pdb_info.create_time=GetMagickTime();
pdb_info.modify_time=pdb_info.create_time;
pdb_info.archive_time=0;
pdb_info.modify_number=0;
......
......@@ -76,6 +76,7 @@
#include "MagickCore/static.h"
#include "MagickCore/string_.h"
#include "MagickCore/module.h"
#include "MagickCore/timer-private.h"
#include "MagickCore/token.h"
#include "MagickCore/transform.h"
#include "MagickCore/utility.h"
......@@ -1451,7 +1452,7 @@ RestoreMSCWarning
value=GetImageProperty(image,"date:create",exception);
if (value != (const char *) NULL)
(void) CopyMagickString(create_date,value,MagickPathExtent);
(void) FormatMagickTime(time((time_t *) NULL),MagickPathExtent,timestamp);
(void) FormatMagickTime(GetMagickTime(),MagickPathExtent,timestamp);
url=(char *) MagickAuthoritativeURL;
escape=EscapeParenthesis(basename);
i=FormatLocaleString(xmp_profile,MagickPathExtent,XMPProfile,
......@@ -3007,7 +3008,7 @@ RestoreMSCWarning
}
}
(void) WriteBlobString(image,buffer);
seconds=time((time_t *) NULL);
seconds=GetMagickTime();
#if defined(MAGICKCORE_HAVE_LOCALTIME_R)
(void) localtime_r(&seconds,&local_time);
#else
......
......@@ -61,6 +61,7 @@
#include "MagickCore/list.h"
#include "MagickCore/magick.h"
#include "MagickCore/memory_.h"
#include "MagickCore/module.h"
#include "MagickCore/monitor.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/nt-base-private.h"
......@@ -72,7 +73,7 @@
#include "MagickCore/quantum-private.h"
#include "MagickCore/static.h"
#include "MagickCore/string_.h"
#include "MagickCore/module.h"
#include "MagickCore/timer-private.h"
#include "MagickCore/token.h"
#include "MagickCore/transform.h"
#include "MagickCore/utility.h"
......@@ -1670,7 +1671,7 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image,
(void) FormatLocaleString(buffer,MagickPathExtent,"%%%%Title: (%s)\n",
image->filename);
(void) WriteBlobString(image,buffer);
timer=time((time_t *) NULL);
timer=GetMagickTime();
(void) FormatMagickTime(timer,MagickPathExtent,date);
(void) FormatLocaleString(buffer,MagickPathExtent,
"%%%%CreationDate: (%s)\n",date);
......
......@@ -57,6 +57,7 @@
#include "MagickCore/list.h"
#include "MagickCore/magick.h"
#include "MagickCore/memory_.h"
#include "MagickCore/module.h"
#include "MagickCore/monitor.h"
#include "MagickCore/monitor-private.h"
#include "MagickCore/monitor-private.h"
......@@ -67,7 +68,7 @@
#include "MagickCore/resource_.h"
#include "MagickCore/static.h"
#include "MagickCore/string_.h"
#include "MagickCore/module.h"
#include "MagickCore/timer-private.h"
#include "MagickCore/utility.h"
/*
......@@ -569,7 +570,7 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image,
(void) FormatLocaleString(buffer,MagickPathExtent,"%%%%Title: (%s)\n",
image->filename);
(void) WriteBlobString(image,buffer);
timer=time((time_t *) NULL);
timer=GetMagickTime();
(void) FormatMagickTime(timer,MagickPathExtent,date);
(void) FormatLocaleString(buffer,MagickPathExtent,