Skip to content
New issue

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

wrong value of time type field #140

Open
GoogleCodeExporter opened this issue Jul 24, 2015 · 5 comments
Open

wrong value of time type field #140

GoogleCodeExporter opened this issue Jul 24, 2015 · 5 comments

Comments

@GoogleCodeExporter
Copy link

I am using 2.21 version.have time field in xls sheet and reader returning 
correct value on my local system like 11:00 am for 11:00 am in xls file but 
when i uploaded it to a server on net i returns wrong value like 4:00 pm for 
every entry less than 12 in the field and for the fields having value greater 
than 12 it i giving correct output .
it there any solution for this ?
please suggest 

Original issue reported on code.google.com by [email protected] on 3 Feb 2012 at 6:34

@GoogleCodeExporter
Copy link
Author

Could you post the file please?

Original comment by [email protected] on 4 Feb 2012 at 4:40

@GoogleCodeExporter
Copy link
Author

excel-reader file and the excel sheet both are attached....

Original comment by [email protected] on 5 Feb 2012 at 7:44

Attachments:

@GoogleCodeExporter
Copy link
Author

Okay when reading your time values, try to retrieve the raw value instead, 
which is decimal (i.e. 0.5 = 12:00, as 1 = 24 hours).

echo date('H:i:s', $file->raw($i, 'B') * 86400 + mktime(0, 0, 0)) // replace $i 
with row number

Original comment by [email protected] on 6 Feb 2012 at 11:03

@GoogleCodeExporter
Copy link
Author

I am also experiencing similar kind of issue; in my case everything works fine 
on local server but when I move it to production every time format is changed 
to 19:00

Original comment by [email protected] on 14 Dec 2012 at 6:31

@GoogleCodeExporter
Copy link
Author

We have tried the above mentioned solution, but it doesn't seem to work as the 
excel sheet already has data in H:i:s format.

Original comment by [email protected] on 14 Dec 2012 at 1:36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant