aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/utils.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/utils.c b/src/utils.c
index 41bebee..3540be8 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -1325,7 +1325,11 @@ void print_apoint(const char *format, long day, struct apoint *apt)
print_date(apt->start, day, extformat);
break;
case FS_DURATION:
- printf("%ld", apt->dur);
+ /* Backwards compatibility: Use epoch by
+ * default. */
+ if (*extformat == '\0')
+ strcpy(extformat, "epoch");
+ print_datediff(apt->dur, extformat);
break;
case FS_ENDDATE:
print_date(apt->start + apt->dur, day,