On Fedora Workstation 41 Beta, up to date, dnf command timestamps (e.g. `dnf history list`) are displayed in UTC instead of local time. Example: ________ $ timedatectl Local time: Sat 2024-10-05 14:11:07 EEST Universal time: Sat 2024-10-05 11:11:07 UTC RTC time: Sat 2024-10-05 14:11:08 Time zone: Europe/... (EEST, +0300) System clock synchronized: yes NTP service: active RTC in local TZ: yes $ sudo dnf install gedit ... [7/7] Installing gedit-2:46.2-5.fc41.aarch64 $ dnf history info last Transaction ID : 14 Begin time : 2024-10-05 11:11:13 ... End time : 2024-10-05 11:11:15 ... Status : Ok Releasever : 41 Description : dnf install gedit Reproducible: Always Steps to Reproduce: 1. Verify system time (e.g. `timedatectl`) 2. Run a dnf command (e.g. `dnf install <package>`) 3. Verify command timestamp (e.g. `dnf history list` or `dnf history info last`) Actual Results: The begin and end time of the dnf command are displayed in UTC time. Expected Results: The begin and end time of the dnf command are displayed in system (local) time.
I confirm this bug.
The implementation is in libdnf5::utils::string::format_epoch(). When fixing it, we will need to discriminate when to use UTC and when to a local time zone. Some invocations are used for producing JSON output.
Seems like a good feature to me, "dnf history..." is being used from the future and using UTC I don't have to be concerned if I need to substract an hour or not due to that time in the past being in daylight standard or daylight savings time But it is bad that it's not clearly marked, it should be: $ dnf history info last Transaction ID : 14 Begin time : 2024-10-05 11:11:13 UTC ... End time : 2024-10-05 11:11:15 UTC ... Status : Ok Releasever : 41 Description : dnf install gedit