New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
format timestamp as date to make it more easy to read in systemCheckPage #19256
Conversation
$results[] = DiagnosticResult::informationalResult('Archive Time Last Started', date("Y-m-d H:i:s", Option::get(CronArchive::OPTION_ARCHIVING_STARTED_TS))); | ||
$results[] = DiagnosticResult::informationalResult('Archive Time Last Finished', date("Y-m-d H:i:s", Option::get(CronArchive::OPTION_ARCHIVING_FINISHED_TS))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a new installation where the archiving might have never been started or finished, the option values might not exist. In that case I guess 1970-01-01 01:00:00
would be displayed. We could maybe simply output a -
for that case (e.g. if the Option::get
returns false).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a suggestion to make it easier to implement @sgiehl's solution - @mikkeschiren can you please review and commit this change if satisfied? Then we can merge this PR I think.
$results[] = DiagnosticResult::informationalResult('Archive Time Last Started', date("Y-m-d H:i:s", Option::get(CronArchive::OPTION_ARCHIVING_STARTED_TS))); | |
$results[] = DiagnosticResult::informationalResult('Archive Time Last Finished', date("Y-m-d H:i:s", Option::get(CronArchive::OPTION_ARCHIVING_FINISHED_TS))); | |
$archive_start = Option::get(CronArchive::OPTION_ARCHIVING_STARTED_TS); | |
$results[] = DiagnosticResult::informationalResult('Archive Time Last Started', ($archive_start ? date("Y-m-d H:i:s", $archive_start) : '-')); | |
$archive_end = Option::get(CronArchive::OPTION_ARCHIVING_FINISHED_TS); | |
$results[] = DiagnosticResult::informationalResult('Archive Time Last Finished', ($archive_end ? date("Y-m-d H:i:s", $archive_end) : '-')); |
If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'. |
If you don't want this PR to be closed automatically in 28 days then you need to assign the label 'Do not close'. |
Closing this PR. I'll cherry-pick and adjust the changes directly to 4.x-dev. |
Description:
Make it easier to read and understand when latest archiving was done.
Review