prep for 1.2rc4 release
[rrdtool.git] / src / rrd_stat.c
index a7b1f33..e70564e 100644 (file)
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * RRDtool 1.1.x  Copyright Tobias Oetiker, 1997 - 2002
+ * RRDtool 1.2rc4  Copyright by Tobi Oetiker, 1997-2005
  *****************************************************************************
  * rrd_stat Retreive the header part of an RRD
  *****************************************************************************/
@@ -29,7 +29,7 @@ rrd_stat(int argc, char **argv)
     printf("\t<step> %lu </step> <!-- Seconds -->\n",rrd.stat_head->pdp_step);
 #if HAVE_STRFTIME
     strftime(somestring,200,"%Y-%m-%d %H:%M:%S %Z",
-            localtime(&rrd.live_head->last_up));
+            localtime_r(&rrd.live_head->last_up, &tm));
 #else
 # error "Need strftime"
 #endif
@@ -116,7 +116,7 @@ rrd_stat(int argc, char **argv)
 
            timer++;
 #if HAVE_STRFTIME
-           strftime(somestring,200,"%Y-%m-%d %H:%M:%S %Z", localtime(&now));
+           strftime(somestring,200,"%Y-%m-%d %H:%M:%S %Z", localtime_r(&now, &tm));
 #else
 # error "Need strftime"
 #endif