aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-07-03 00:47:29 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-07-03 00:47:29 +0800
commit34ac708eae35982d21248a9b0a29f0d8ac8a3a78 (patch)
tree5d2fc607da7eeb2690947b04bd45e1e7e288462f /camel
parentbb4c3e2cd457dc99c7346e574111442dfe1ba81c (diff)
downloadgsoc2013-evolution-34ac708eae35982d21248a9b0a29f0d8ac8a3a78.tar
gsoc2013-evolution-34ac708eae35982d21248a9b0a29f0d8ac8a3a78.tar.gz
gsoc2013-evolution-34ac708eae35982d21248a9b0a29f0d8ac8a3a78.tar.bz2
gsoc2013-evolution-34ac708eae35982d21248a9b0a29f0d8ac8a3a78.tar.lz
gsoc2013-evolution-34ac708eae35982d21248a9b0a29f0d8ac8a3a78.tar.xz
gsoc2013-evolution-34ac708eae35982d21248a9b0a29f0d8ac8a3a78.tar.zst
gsoc2013-evolution-34ac708eae35982d21248a9b0a29f0d8ac8a3a78.zip
Use gmtime_r() instead of using gmtime() and memcpy() to try and be
2003-07-01 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_format_date): Use gmtime_r() instead of using gmtime() and memcpy() to try and be "atomic". svn path=/trunk/; revision=21725
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/camel-mime-utils.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 578af8c0cf..4e53989aea 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,8 @@
+2003-07-01 Jeffrey Stedfast <fejj@ximian.com>
+
+ * camel-mime-utils.c (header_format_date): Use gmtime_r() instead
+ of using gmtime() and memcpy() to try and be "atomic".
+
2003-06-30 Dan Winship <danw@ximian.com>
* camel-folder-search.c (camel_folder_search_finalize): free the
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index 1b79a06955..2b71ec3866 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -3438,9 +3438,9 @@ header_format_date(time_t time, int offset)
time += ((offset / 100) * (60*60)) + (offset % 100)*60;
d(printf("converting date %s", ctime(&time)));
-
- memcpy(&tm, gmtime(&time), sizeof(tm));
-
+
+ gmtime_r (&time, &tm);
+
return g_strdup_printf("%s, %02d %s %04d %02d:%02d:%02d %+05d",
tz_days[tm.tm_wday],
tm.tm_mday, tz_months[tm.tm_mon],