- if (printf("%ld %ld %s\n", range->start, range->end, line) < 0)
- die("Couldn't write");
+ if (conf->time_format) {
+ const size_t MAX_TIMESTAMP_LENGTH = 1024;
+ char a[MAX_TIMESTAMP_LENGTH];
+ char b[MAX_TIMESTAMP_LENGTH];
+ format_time(conf, a, MAX_TIMESTAMP_LENGTH, &range->start);
+ format_time(conf, b, MAX_TIMESTAMP_LENGTH, &range->end);
+ if (printf("%s %s %s\n", a, b, line) < 0)
+ die("Couldn't write");
+ } else {
+ if (printf("%ld %ld %s\n", range->start, range->end, line) < 0)
+ die("Couldn't write");
+ }