make gmtime thread safe.
authorChenthill Palanisamy <pchen@src.gnome.org>
Thu, 23 Mar 2006 19:46:10 +0000 (19:46 +0000)
committerChenthill Palanisamy <pchen@src.gnome.org>
Thu, 23 Mar 2006 19:46:10 +0000 (19:46 +0000)
calendar/libecal/e-cal-time-util.c

index 68b390b..73195f0 100644 (file)
@@ -570,9 +570,11 @@ char *
 isodate_from_time_t (time_t t)
 {
        gchar *ret;
+       struct tm stm;
 
+       gmtime_r (&t, &stm);
        ret = g_malloc (17); /* 4+2+2+1+2+2+2+1 + 1 */
-       strftime (ret, 17, "%Y%m%dT%H%M%SZ", gmtime (&t));
+       strftime (ret, 17, "%Y%m%dT%H%M%SZ", &stm);
 
        return ret;
 }