pmg-log-tracker failed to parse start time

rct

New Member
Mar 24, 2026
7
2
3
The help text says "YYYY-MM-DD HH:MM:SS", which I think I'm following but I get

Code:
$ pmg-log-tracker -s '2026-03-23 12:00:00'
Error: failed to parse start time

I put the string in single quotes so the shell (Bash) should pass both date and time as a single argument, despite the space.

I found this forum post from 2020 which covers the same thing, but it isn't working for me with PMG 9.0.6.

Using epoch seconds as a workaround works. Am I missing something or is there a bug/documentation issue?

Thanks
 
Thanks for your reply, either type of quotes will be parsed by the shell, bash in my case, so it shouldn't matter.

And just to verify, pasting in the literal example you provided from the admin guide, also fails.

Code:
$ pmg-log-tracker -i /var/log/mail.log -s "2021-07-01 00:00:00" -e "2021-07-15 23:59:59"
Error: failed to parse start time

I should probably see if there is a way to submit a bug report without a subscription.
 
I don't speak Rust, but I figured I'd glance at the source code for clues There are references to RFC 3339, so I tested it with an RFC 3339 date time string and it worked.

I had previously tried with a T as the separator between date and time, but didn't include a time zone, which is now required.

So this works:
Code:
pmg-log-tracker -s "2026-03-25T12:00:00-04:00"  # Noon for US/Eastern during DST.

pmg-log-tracker -s "2026-03-25T16:00:00Z"  # Noon for US/Eastern during DST.

So the code no longer matches the docs and help text.
 
  • Like
Reactions: Onslow
Another code vs. docs issue:

By default the end time will be the current time and the start time will be 0:00 of the current day.

This is ambiguous, would you take that to mean midnight local time or midnight UTC?

Most of the Web UI seems to follow local time. However pmg-log-tracker (at least as of 9.0.6) defaults to midnight UTC, so for me it starts at 8pm local time instead of midnight.

So if you want it to match some of the output in the Web UI, this will work:

Code:
pmg-log-tracker -s $(date -Iseconds -d 'today 00:00')
 
@rct Good that you found the bugs and the way to "bypass" them. They surely should be fixed.

From many posts in the Forum I believe that submitting a bug report at https://bugzilla.proxmox.com/ does not require a subscription. So you should be able to report them for the benefit of the community :)
Thank you in advance!