We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is:
When importing an XML spreadsheet and saving it into XLSX, the dates should remain unchanged.
The default timezone gets subtracted from all imported dates.
[root@centos PhpSpreadsheet]# cat test.xml <?xml version="1.0" ?><?mso-application progid="Excel.Sheet"?><Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"> <Styles> <Style ss:ID="date"><NumberFormat ss:Format="Short Date"/></Style> </Styles> <Worksheet ss:Name="Test"><Table> <Row> <Cell ss:StyleID="date"><Data ss:Type="DateTime">2020-05-04T00:00:00</Data></Cell> </Row> </Table></Worksheet> </Workbook> [root@centos PhpSpreadsheet]# php <?php require 'vendor/autoload.php'; date_default_timezone_set('Asia/Jerusalem'); $obj = (new \PhpOffice\PhpSpreadsheet\Reader\Xml)->load('test.xml'); (new \PhpOffice\PhpSpreadsheet\Writer\Xlsx($obj))->save('test.xlsx');
Opening test.xml in Excel shows the correct date (04/05/2020) Opening test.xlsx in Excel shows the corrupted date (03/05/2020 21:00:00)
PHP Version 7.3.13, PhpSpreadsheet 1.13.0
The root cause of this bug is #611
The text was updated successfully, but these errors were encountered:
PHPOffice#1504: Using non-UTC timezone corrupts dates imported from X…
b375020
…ML spreadsheet
#1504: Using non-UTC timezone corrupts dates imported from XML spread…
35c0496
…sheet (#1506)
visszavonjuk a korábban tett javításunkat, mert időközben ezt már meg…
30b96a5
…oldották az eredeti repo-ban is korábbi javításunk: PHPOffice#611 (comment) javítás issue-ja: PHPOffice#1504 javítás pull request-je: https://github.com/PHPOffice/PhpSpreadsheet/pull/1506/files
Successfully merging a pull request may close this issue.
This is:
What is the expected behavior?
When importing an XML spreadsheet and saving it into XLSX, the dates should remain unchanged.
What is the current behavior?
The default timezone gets subtracted from all imported dates.
What are the steps to reproduce?
Opening test.xml in Excel shows the correct date (04/05/2020)
Opening test.xlsx in Excel shows the corrupted date (03/05/2020 21:00:00)
Which versions of PhpSpreadsheet and PHP are affected?
PHP Version 7.3.13, PhpSpreadsheet 1.13.0
The root cause of this bug is #611
The text was updated successfully, but these errors were encountered: