X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=program%2Fsrc%2Frrd_graph_helper.c;h=ef1e8e747bb2b6c18ef85dc656fbcdcea98ea388;hb=afbab79d68867349fe06a2948ae0c911d5b81bc8;hp=bea9d7b6c06ad711ba0aab6d849696f3d3ccd2dc;hpb=fcd317a0447e81bcb5ddd51177331c8c50b25dc2;p=rrdtool-all.git diff --git a/program/src/rrd_graph_helper.c b/program/src/rrd_graph_helper.c index bea9d7b6..ef1e8e74 100644 --- a/program/src/rrd_graph_helper.c +++ b/program/src/rrd_graph_helper.c @@ -287,14 +287,14 @@ rrd_parse_def(char *line, unsigned int *eaten, graph_desc_t *gdp, image_desc_t * int i=0; char command[6]; /* step, start, end */ char tmpstr[256]; - struct time_value start_tv,end_tv; + struct rrd_time_value start_tv,end_tv; time_t start_tmp=0,end_tmp=0; char *parsetime_error=NULL; start_tv.type = end_tv.type=ABSOLUTE_TIME; start_tv.offset = end_tv.offset=0; - memcpy(&start_tv.tm, localtime(&gdp->start) , sizeof(struct tm) ); - memcpy(&end_tv.tm, localtime(&gdp->end) , sizeof(struct tm) ); + localtime_r(&gdp->start, &start_tv.tm); + localtime_r(&gdp->end, &end_tv.tm); dprintf("- parsing '%s'\n",&line[*eaten]); dprintf("- from line '%s'\n",line);