summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f01e70c)
raw | patch | inline | side by side (parent: f01e70c)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 1 Jun 2009 13:58:58 +0000 (13:58 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Mon, 1 Jun 2009 13:58:58 +0000 (13:58 +0000) |
this takes care of debian bug 332766
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1836 a5681a0c-68f1-0310-ab6d-d61299d08faa
git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1836 a5681a0c-68f1-0310-ab6d-d61299d08faa
src/rrd_update.c | patch | blob | history |
diff --git a/src/rrd_update.c b/src/rrd_update.c
index 11a00bb5f036b81e5dbc5cccf2a76b7ecdf88e0c..0c3474311ee57385b235e5cc50ff3dba78b55f0b 100644 (file)
--- a/src/rrd_update.c
+++ b/src/rrd_update.c
return -1;
};
setlocale(LC_NUMERIC, old_locale);
+ if (tmp < 0.0){
+ gettimeofday(&tmp_time, 0);
+ tmp = (double)tmp_time.tv_sec + (double)tmp_time.tv_usec * 1e-6f + tmp;
+ }
+
*current_time = floor(tmp);
*current_time_usec = (long) ((tmp - (double) *current_time) * 1e6f);
}