From 0e29df87f43365309f89d6dbd5b4a3acd8ea5054 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 4 Oct 2011 20:33:17 -0700 Subject: [PATCH] Make the dive merging code more tolerant Depending on the tool used to import a dive from the uemis Zurich we end up with different time stamps for the dive - just by a few seconds, but the existing code insisted on an exact match. We now allow for up to 60 seconds in difference and still consider two dives as the same. Signed-off-by: Dirk Hohndel --- dive.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dive.c b/dive.c index 9af6449..deb72fc 100644 --- a/dive.c +++ b/dive.c @@ -410,7 +410,7 @@ struct dive *try_to_merge(struct dive *a, struct dive *b) int i; struct dive *res; - if (a->when != b->when) + if ((a->when >= b->when + 60) || (a->when <= b->when - 60)) return NULL; res = alloc_dive(); -- 2.43.0