Make date formatting more reliable#65
Conversation
|
@rgwood Let me know if anything should be changed or improved. Thank you! |
|
Hi, thanks for the PR! I don't think this addresses the core issue - which is that the time format in logs can vary across system. This will work on systems where the date is formatted in RFC3339, and not on others. Might still be an improvement. I'm a little busy but will take a closer look when I can. |
|
Thanks for reviewing the PR! In the code, we always pass systemctl-tui/src/components/home.rs Line 445 in 1de7cae Looking at the man page, So, using Take your time to review and let me know if you see any potential issues. |
|
Right, I should have put more context in my initial issue. For reasons I don't fully understand, On my laptop (Ubuntu 24.04, systemv v255): On an older server (Debian 11, systemd v247): I think this PR is an improvement (thank you! will probably merge it tonight) but I don't yet understand why |
|
Ah, I found the change: systemd/systemd#29134 |
|
Pushed a commit to make this work correctly on older systemd. Thanks for the PR! |
Description
This replaces the old length-based date detection with proper RFC3339 timestamp parsing. Journal timestamps are now parsed using
chronoinstead of relying on string length. No behavior change for non-timestamp lines.Related Issue - #33