Now --since and --until requires any time field in the output (e.g.
--ctime,-T), it means "dmesg --since '1 day ago'" doesn't work, but
"dmesg -T --since '1 day ago'" works as expected.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=
2076829
Signed-off-by: Karel Zak <kzak@redhat.com>
if ((is_timefmt(&ctl, RELTIME) ||
is_timefmt(&ctl, CTIME) ||
- is_timefmt(&ctl, ISO8601))) {
+ is_timefmt(&ctl, ISO8601)) ||
+ ctl.since ||
+ ctl.until) {
if (dmesg_get_boot_time(&ctl.boot_time) != 0)
ctl.time_fmt = DMESG_TIMEFTM_NONE;
else