From 6a2c9cfbc724ed7fa91e65ddbb1e8d024ef463be Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Tue, 25 Apr 2023 14:48:38 +0100 Subject: [PATCH] MDL-78023 tool_policy: cast timemodified column on table download. --- admin/tool/policy/classes/acceptances_table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/tool/policy/classes/acceptances_table.php b/admin/tool/policy/classes/acceptances_table.php index 135f5bc4c1e..734d329aeca 100644 --- a/admin/tool/policy/classes/acceptances_table.php +++ b/admin/tool/policy/classes/acceptances_table.php @@ -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'));