jasonrogena / jasonrogena/php-excel-reader
Large dates not handled correctly
- Dominant language
- PHP
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
```
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
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the date-conversion path that passes timestamps to gmdate(), then reproduce the issue with an Excel date of 7/7/2078. Compare the result with the expected date and verify that dates outside gmdate()'s range are handled correctly or produce an explicit warning or error instead of 5/31/1942.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100