voducthang / php-excel-reader

Automatically exported from code.google.com/p/php-excel-reader
0 stars 0 forks source link

Large dates not handled correctly #134

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Large dates -- dates far in the future -- are not handled correctly. I assume 
this is because the timestamp calculated is passed through gmdate() which has a 
date range limit that ends in 2038.

For example, 7/7/2078 is a valid date and is displayed as such in Excel. 
However when reading it with php-exel-reader, it comes out as 5/31/1942.

-L

What steps will reproduce the problem?
1. Enter a large date into a cell (7/7/2078) in Excel
2. Save
3. Read with php-excel-reader

What is the expected output? What do you see instead?

Expected: 7/7/2078
Actual: 5/31/1942

Please provide any additional information below.

gmdate() has a date range that is more limited than what excel allows. This 
should be handled correctly -- the code should be able to test to see if the 
date is outside gmdate()s range and handle it correctly or at least throw an 
error or warning. As it is now, it silently outputs invalid dates.

Original issue reported on code.google.com by Lawrence...@gmail.com on 20 Dec 2011 at 10:33