From 7cf603fbf738367f82593533c14ecaf4ecff4e63 Mon Sep 17 00:00:00 2001 From: Teemu Toivola Date: Tue, 7 Feb 2017 17:48:56 +0200 Subject: [PATCH] fix --importdb that was creating invalid timestamps, broken since 1.15, closes #55 --- src/vnstat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vnstat.c b/src/vnstat.c index 8d4508d..94fce16 100644 --- a/src/vnstat.c +++ b/src/vnstat.c @@ -584,8 +584,8 @@ void handleimport(PARAMS *p) printf("Error: validation of imported database failed.\n"); exit(EXIT_FAILURE); } - /* set boot time to zero in order to force counter sync */ - data.btime = 0; + /* set boot time to one in order to force counter sync */ + data.btime = 1; strncpy_nt(data.interface, p->interface, 32); if (writedb(p->interface, p->dirname, 1)) { printf("Database import for \"%s\" completed.\n", data.interface); -- 2.40.0