PhpSpreadsheet/tests/PhpSpreadsheetTests
oleibman 5dd7e883c6
Fix Issue 1441 (isDateTime and Formulas) (#1480)
* Fix Issue 1441 (isDateTime and Formulas)

When you have a date-field which is a formula, isDateTime returns false.
https://github.com/PHPOffice/PhpSpreadsheet/issues/1441

Report makes sense; fixed as suggested. Also fixed a few minor
related issues, and added tests so that Shared/Date and Shared/TimeZone
are now completely covered.

Date/setDefaultTimeZone and TimeZone/setTimeZone were not consistent
about what to do in event of failure - return false or throw.
They will now both return false, which is what Date's function
said it would do in its doc block anyhow. Date/validateTimeZone will
continue to throw; it was protected, but was never called outside
Date, so I changed it to private.

TimeZone/getTimeZoneAdjustment checked for 'UST' when it probably
meant 'UTC', and, as it turns out, the check is not even needed.

The most serious problem was that TimeZone/validateTimeZone does not
check the backwards-compatible time zones. The timezone project
aggressively, and very controversially, "demotes" timezones;
such timezones eventually wind up in the PHP backwards-compatible list.
We want to make sure to check that list so that our applications do not
break when this happens.
2020-05-24 20:02:39 +02:00
..
Calculation Testing - Delete Temp Files When No Longer Needed (#1488) 2020-05-24 20:03:07 +09:00
Cell fix: issue #1476 crash with numeric string value terminating with new line (#1481) 2020-05-23 12:49:54 +02:00
Chart Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
Collection Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
Custom Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
Functional Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
Helper Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
Reader Testing - Delete Temp Files When No Longer Needed (#1488) 2020-05-24 20:03:07 +09:00
Shared Fix Issue 1441 (isDateTime and Formulas) (#1480) 2020-05-24 20:02:39 +02:00
Style Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
Worksheet Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
Writer Testing - Delete Temp Files When No Longer Needed (#1488) 2020-05-24 20:03:07 +09:00
DocumentGeneratorTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
IOFactoryTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
ReferenceHelperTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
SettingsTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00
SpreadsheetTest.php Update PHP-CS-Fixer rules 2020-05-18 13:49:57 +09:00