]> git.ipfire.org Git - thirdparty/systemd.git/commit
systemctl: Support --timestamp for otherwise named properties
authorChris Down <chris@chrisdown.name>
Wed, 5 Nov 2025 09:46:40 +0000 (17:46 +0800)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 5 Nov 2025 22:45:06 +0000 (07:45 +0900)
commit8ab6925c5e889c238d282fef3061f7651755eb5e
treed4ca956ee9a13cffcb16103c9e70fa75d10028d3
parentbea3b300bc07271664e0c6f8b73c6e049df9aa1a
systemctl: Support --timestamp for otherwise named properties

`systemctl show`'s `--timestamp` flag is supposed to reformat all
timestamp-based properties. However, the logic for detecting these
properties was incomplete and only checked if the name ended in
Timestamp.

Expand the check to explicitly include some non-"timestamp" named
properties that really are timestamps.

Fixes: https://github.com/systemd/systemd/issues/39282
src/shared/bus-print-properties.c
src/shared/bus-print-properties.h
src/systemctl/systemctl-show.c
test/units/TEST-26-SYSTEMCTL.sh