X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=src%2Frrd_stat.c;h=9c7fd871df2c5a14b4e2550a1efe7b8472f528d7;hp=a7b1f33c10e368ba510bb8164a0062284a0653cc;hb=990fcfb7eec407edfe504f42760bae204e1c074d;hpb=285da1fa16e80919db972b1d7021c0b4705bedb1 diff --git a/src/rrd_stat.c b/src/rrd_stat.c index a7b1f33..9c7fd87 100644 --- a/src/rrd_stat.c +++ b/src/rrd_stat.c @@ -1,5 +1,5 @@ /***************************************************************************** - * RRDtool 1.1.x Copyright Tobias Oetiker, 1997 - 2002 + * RRDtool 1.2rc9 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