c959137 / php-excel-reader

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

Dates are off #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
As with the original script I am experiencing wrong date conversion with 
the current version of php-excel-reader.

I am using a standard .XLS-file (Possibly created with Excel 2002 on 
Windows) on a Windows XP PC with PHP 5.2.6 running, everything with german 
localisation and in the timezone UTC+1.

For example: The date '03.10.2008 14:40' gets converted to the (Non 
standard format) '04/10/2008 16:50'.

All dates are 93600 seconds off.

I submit this workaround for line 1095:
    $utcValue = round(($utcDays+1) * SPREADSHEET_EXCEL_READER_MSINADAY - 
93600);

Original issue reported on code.google.com by 128625 on 17 Dec 2008 at 12:03

GoogleCodeExporter commented 9 years ago
Hi 128625, thanks for pointing out the exact line for me.

$utcValue = round(($utcDays+1) * SPREADSHEET_EXCEL_READER_MSINADAY - 86400);

works better for me though. I'd love to see this issue fixed, my need for this 
function is to import dates of the format m/d/yyyy hh:mm:ss AM/PM and your work-
around has saved the day for me - will use this until a permanent fix comes by.

Original comment by karthikp...@gmail.com on 24 Jan 2009 at 9:42

GoogleCodeExporter commented 9 years ago
I believe I have made a fix for the date issues and will be checking it in 
shortly

Original comment by matthew....@gmail.com on 26 Jan 2009 at 5:56

GoogleCodeExporter commented 9 years ago
I believe the issue with dates being off has been fixed.

Original comment by matthew....@gmail.com on 26 Jan 2009 at 6:16

GoogleCodeExporter commented 9 years ago
Please submit this bug to the downloable file, cos the last modification still 
has
the problem.

thanks 

Original comment by maoneid on 18 Feb 2009 at 4:43

GoogleCodeExporter commented 9 years ago
I have problems with Date.
In the cell I have '03-12-2003', but val function retreives
2003200320032003/DecDec/MonMon

Original comment by sebasala...@gmail.com on 17 Apr 2009 at 8:19

GoogleCodeExporter commented 9 years ago
Please submit an XLS file showing the problem if you think it still exists. 
Also, let
us know your time zone and what your default date format is (mm/dd/yyyy or 
dd/mm/yyyy)

Original comment by matthew....@gmail.com on 17 Apr 2009 at 10:33

GoogleCodeExporter commented 9 years ago
Hai

I have problem with date format.my excel date method is (12/09/2011) dd/mm/yyyy 
. while reading the excel date column date is converted to 
MonMon/SepSep/2011201120112011 . 
so now how to convert the proper date method?

thanks,

Original comment by maniprak...@gmail.com on 22 Sep 2011 at 5:48

GoogleCodeExporter commented 9 years ago
Hai

I have problem with date format.my excel date method is (12/09/2011) dd/mm/yyyy 
. while reading the excel date column date is converted to 
MonMon/SepSep/2011201120112011 . 
so now how to convert the proper date method?

thanks,

Original comment by maniprak...@gmail.com on 22 Sep 2011 at 6:14