summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gobgp/main.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/gobgp/main.go b/gobgp/main.go
index d86ae7b3..370d80ce 100644
--- a/gobgp/main.go
+++ b/gobgp/main.go
@@ -60,13 +60,12 @@ func formatTimedelta(d int64) string {
u /= 60
mins := u % 60
u /= 60
- hours := u % 60
+ hours := u % 24
days := u / 24
if days == 0 {
return fmt.Sprintf("%02d:%02d:%02d", hours, mins, secs)
} else {
- hours -= days * 24
return fmt.Sprintf("%dd ", days) + fmt.Sprintf("%02d:%02d:%02d", hours, mins, secs)
}
}