Cristy
2019-04-15 11:46:52 -04:00
parent b6c531a799
commit 1ec1562eca
7 changed files with 45 additions and 48 deletions
+2
View File
@@ -6,6 +6,8 @@
https://imagemagick.org/discourse-server/viewforum.php?f=3).
* Fixed a number of issues (reference
https://github.com/ImageMagick/ImageMagick/issues).
* Honor SOURCE_DATE_EPOCH environment variable (reference
https://github.com/ImageMagick/ImageMagick/pull/1496/).
2019-04-07 7.0.8-39 Cristy <quetzlzacatenango@image...>
* Release ImageMagick version 7.0.8-39, GIT revision 15489:6120f8bc1:20190406
+35 -3
View File
@@ -1,12 +1,12 @@
/*
Copyright 1999-2019 ImageMagick Studio LLC, a non-profit organization
dedicated to making software imaging solutions freely available.
You may not use this file except in compliance with the License. You may
obtain a copy of the License at
https://imagemagick.org/script/license.php
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -22,6 +22,38 @@
extern "C" {
#endif
static inline void GetUTCTime(const time_t *timep,struct tm *result)
{
#if defined(MAGICKCORE_HAVE_GMTIME_R)
(void) gmtime_r(timep,result);
#else
{
struct tm
*my_time;
my_time=gmtime(timep);
if (my_time != (struct tm *) NULL)
(void) memcpy(result,my_time,sizeof(gm_time));
}
#endif
}
static inline void GetLocalTime(const time_t *timep,struct tm *result)
{
#if defined(MAGICKCORE_HAVE_GMTIME_R)
(void) localtime_r(timep,result);
#else
{
struct tm
*my_time;
my_time=localtime(timep);
if (my_time != (struct tm *) NULL)
(void) memcpy(result,my_time,sizeof(gm_time));
}
#endif
}
extern MagickPrivate time_t
GetMagickTime(void);
+2 -28
View File
@@ -259,36 +259,10 @@ MagickExport ssize_t FormatMagickTime(const time_t time,const size_t length,
count;
struct tm
gm_time,
local_time;
gm_time;
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
GetUTCTime(&time,&gm_time);
count=FormatLocaleString(timestamp,length,
"%04d-%02d-%02dT%02d:%02d:%02d%+03d:00",gm_time.tm_year+1900,
gm_time.tm_mon+1,gm_time.tm_mday,gm_time.tm_hour,gm_time.tm_min,
+2 -6
View File
@@ -992,13 +992,9 @@ static MagickBooleanType WriteCINImage(const ImageInfo *image_info,Image *image,
offset+=WriteBlob(image,sizeof(cin.file.filename),(unsigned char *)
cin.file.filename);
seconds=GetMagickTime();
#if defined(MAGICKCORE_HAVE_LOCALTIME_R)
(void) localtime_r(&seconds,&local_time);
#else
(void) memcpy(&local_time,localtime(&seconds),sizeof(local_time));
#endif
GetUTCTime(&seconds,&local_time);
(void) memset(timestamp,0,sizeof(timestamp));
(void) strftime(timestamp,MagickPathExtent,"%Y:%m:%d:%H:%M:%S%Z",&local_time);
(void) strftime(timestamp,MaxTextExtent,"%Y:%m:%d:%H:%M:%SUTC",&local_time);
(void) memset(cin.file.create_date,0,sizeof(cin.file.create_date));
(void) CopyMagickString(cin.file.create_date,timestamp,11);
offset+=WriteBlob(image,sizeof(cin.file.create_date),(unsigned char *)
+1 -5
View File
@@ -1607,11 +1607,7 @@ static MagickBooleanType WriteMATImage(const ImageInfo *image_info,Image *image,
image->depth=8;
current_time=GetMagickTime();
#if defined(MAGICKCORE_HAVE_LOCALTIME_R)
(void) localtime_r(&current_time,&local_time);
#else
(void) memcpy(&local_time,localtime(&current_time),sizeof(local_time));
#endif
GetUTCTime(&current_time,&local_time);
(void) memset(MATLAB_HDR,' ',MagickMin(sizeof(MATLAB_HDR),124));
FormatLocaleString(MATLAB_HDR,sizeof(MATLAB_HDR),
"MATLAB 5.0 MAT-file, Platform: %s, Created on: %s %s %2d %2d:%2d:%2d %d",
+1 -5
View File
@@ -3009,11 +3009,7 @@ RestoreMSCWarning
}
(void) WriteBlobString(image,buffer);
seconds=GetMagickTime();
#if defined(MAGICKCORE_HAVE_LOCALTIME_R)
(void) localtime_r(&seconds,&local_time);
#else
(void) memcpy(&local_time,localtime(&seconds),sizeof(local_time));
#endif
GetUTCTime(&seconds,&local_time);
(void) FormatLocaleString(date,MagickPathExtent,"D:%04d%02d%02d%02d%02d%02d",
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);
+2 -1
View File
@@ -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/utility.h"
#if defined(MAGICKCORE_PNG_DELEGATE)
@@ -8366,7 +8367,7 @@ static void write_tIME_chunk(Image *image,png_struct *ping,png_info *info,
ptime.hour = hour;
ptime.minute = minute;
ptime.second = second;
png_convert_from_time_t(&ptime,GetMagickTime());
LogMagickEvent(CoderEvent,GetMagickModule(),
" png_set_tIME: y=%d, m=%d, d=%d, h=%d, m=%d, s=%d, ah=%d, am=%d",
ptime.year, ptime.month, ptime.day, ptime.hour, ptime.minute,