From 2d21b7c602d782d875327020ab5f2ea2da6fc383 Mon Sep 17 00:00:00 2001 From: Sander Roosendaal Date: Wed, 21 Aug 2024 17:41:49 +0200 Subject: [PATCH] negative duration avoidance --- rowers/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rowers/utils.py b/rowers/utils.py index 2d697c0c..f403630c 100644 --- a/rowers/utils.py +++ b/rowers/utils.py @@ -480,6 +480,9 @@ def totaltime_sec_to_string(totaltime, shorten=False): if np.isnan(totaltime): return '' + if totaltime < 0: + totaltime = -totaltime + fmt = '{H:02}:{M:02}:{S:02}.{t}' if shorten: fmt = '{H}:{M:02}:{S:02}'