From 35c04964cf63a06561a5aeb199853f4b8e59b135 Mon Sep 17 00:00:00 2001 From: tyomitch Date: Fri, 19 Jun 2020 20:38:06 +0200 Subject: [PATCH] #1504: Using non-UTC timezone corrupts dates imported from XML spreadsheet (#1506) --- src/PhpSpreadsheet/Reader/Xml.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpSpreadsheet/Reader/Xml.php b/src/PhpSpreadsheet/Reader/Xml.php index 15fb34ad..f9ad5475 100644 --- a/src/PhpSpreadsheet/Reader/Xml.php +++ b/src/PhpSpreadsheet/Reader/Xml.php @@ -516,7 +516,7 @@ class Xml extends BaseReader break; case 'DateTime': $type = DataType::TYPE_NUMERIC; - $cellValue = Date::PHPToExcel(strtotime($cellValue)); + $cellValue = Date::PHPToExcel(strtotime($cellValue . ' UTC')); break; case 'Error':