Skip to content

Commit

Permalink
Merge pull request #345 from catalyst/setup-table-date
Browse files Browse the repository at this point in the history
Updated date display for lastverified to handle 0 correctly
  • Loading branch information
Peterburnett authored May 3, 2022
2 parents c10a67c + 9a3201d commit 2f9e87f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ public function active_factors() {
$timecreated = $userfactor->timecreated == '-' ? '-'
: userdate($userfactor->timecreated, get_string('strftimedatetime'));
$lastverified = $userfactor->lastverified;
if ($lastverified != '-') {
if ($lastverified == 0) {
$lastverified = '-';
} else if ($lastverified != '-') {
$lastverified = userdate($userfactor->lastverified, get_string('strftimedatetime'));
$lastverified .= '<br>';
$lastverified .= get_string('ago', 'core_message', format_time(time() - $userfactor->lastverified));
Expand Down

0 comments on commit 2f9e87f

Please sign in to comment.