Skip to content

Commit

Permalink
#1504: Using non-UTC timezone corrupts dates imported from XML spread…
Browse files Browse the repository at this point in the history
…sheet (#1506)
  • Loading branch information
tyomitch authored Jun 19, 2020
1 parent 2628960 commit 35c0496
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Reader/Xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ public function loadIntoExisting($pFilename, Spreadsheet $spreadsheet)
break;
case 'DateTime':
$type = DataType::TYPE_NUMERIC;
$cellValue = Date::PHPToExcel(strtotime($cellValue));
$cellValue = Date::PHPToExcel(strtotime($cellValue . ' UTC'));

break;
case 'Error':
Expand Down

0 comments on commit 35c0496

Please sign in to comment.