MDL-78023 tool_policy: cast timemodified column on table download.

This commit is contained in:
Paul Holden 2023-04-25 14:48:38 +01:00
parent 4e632b7251
commit 99daf499c7
No known key found for this signature in database
GPG Key ID: A81A96D6045F6164

View File

@ -573,7 +573,7 @@ class acceptances_table extends \table_sql {
if ($row->timemodified) {
if ($this->is_downloading()) {
// Use timestamp format readable for both machines and humans.
return date_format_string($row->timemodified, '%Y-%m-%d %H:%M:%S %Z');
return date_format_string((int) $row->timemodified, '%Y-%m-%d %H:%M:%S %Z');
} else {
// Use localised calendar format.
return userdate($row->timemodified, get_string('strftimedatetime'));