Display timestamps in local time zone, respecting TZ environment variable #2200
Labels
downstream
Also reported in Jira or Bugzilla
Priority: LOW
RFE
Request For Enhancement (as opposed to a bug)
Triaged
Someone on the DNF 5 team has read the issue and determined the next steps to take
dnf-4.23.0-1.fc40.noarch uses local time timestamps (at the moment +0200 due to summer time) in
dnf history
and/var/log/dnf.log
.dnf5-5.2.12.0-2.fc42.x86_64 uses UTC time timestamps in
dnf history
and/var/log/dnf5.log
. In example below you see the 2 hour difference. The difference makes it harder to trace actions, because all other apps' logs and timestamps use local time.Because RPM scriptlet action's output gets truncated I
grep /var/log/dnf.log
after automated system installation is done.I cannot find an option to force dnf5 to use local time. Is there no such option? Something like
dnf history list --uselocaltime
would be handy.I found an issue was created for upstream tests #900 reply:
In rpm-software-management/ci-dnf-stack#1386 the same issue got reply:
I do not know the big picture: brainstorming: Add dnf5 option to force UTC time output? Update the upstream tests to cope with local time?
If no change is intended, please, add a note to https://dnf5.readthedocs.io/en/stable/changes_from_dnf4.7.html that dnf5 output is unified on UTC.
Example with Fedora 42 and dnf5:
Kudos for the timestamp formatting:
2025-04-16T11:40:25
I like it much better than
journalctl
's output:Apr 16 13:40:50
The text was updated successfully, but these errors were encountered: