dmesg: define is_timefmt() macro only once

Signed-off-by: Karel Zak <kzak@redhat.com>