X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_stat.c;h=106b07d36dd1198a60d6c653af3a6b441a04f5ca;hp=c233ca14c93ed8c7c71bb3dbcef79437f0765653;hb=c112f7c06e534ce7a5a4e25b6f7f742aeb051850;hpb=5837606887a6d81e8b1f7588525cb1c8783fb62b diff --git a/src/rrd_stat.c b/src/rrd_stat.c index c233ca1..106b07d 100644 --- a/src/rrd_stat.c +++ b/src/rrd_stat.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.0.33 Copyright Tobias Oetiker, 1997 - 2000 + * RRDtool 1.2rc3 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 %lu \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