aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-utils.c
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/camel-mime-utils.c
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/camel-mime-utils.c')
-rw-r--r--camel/camel-mime-utils.c6
1 files changed, 3 insertions, 3 deletions
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],