Skip to content

Commit 35c0496

Browse files
authored
#1504: Using non-UTC timezone corrupts dates imported from XML spreadsheet (#1506)
1 parent 2628960 commit 35c0496

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpSpreadsheet/Reader/Xml.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet)
516516
break;
517517
case 'DateTime':
518518
$type = DataType::TYPE_NUMERIC;
519-
$cellValue = Date::PHPToExcel(strtotime($cellValue));
519+
$cellValue = Date::PHPToExcel(strtotime($cellValue . ' UTC'));
520520

521521
break;
522522
case 'Error':

0 commit comments

Comments
 (0)