diff options
Diffstat (limited to 'source/ui-shared.c')
-rw-r--r--source/ui-shared.c6
1 file changed, 3 insertions, 3 deletions
diff --git a/source/ui-shared.c b/source/ui-shared.c
index a0a0664..d1b9994 100644
--- a/source/ui-shared.c
+++ b/source/ui-shared.c
@@ -1418,9 +1418,9 @@ void cgit_print_age(time_t t, int tz, time_t max_relative)
if (!t)
return;
time(&now);
- secs = now - t;
- if (secs < 0)
- secs = 0;
+ // A date past now, or one so far off that the difference cannot be
+ // held, reads as no age at all.
+ secs = t > now ? 0 : now - t;
if (!ctx.cfg.enable_relative_dates || (secs > max_relative && max_relative >= 0)) {
print_abs_date(t, tz);