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

Precision issue on minutes #159

Open
fellwell5 opened this issue Jan 18, 2019 · 0 comments
Open

Precision issue on minutes #159

fellwell5 opened this issue Jan 18, 2019 · 0 comments

Comments

@fellwell5
Copy link

I experienced an issue that showed me minutes wrong.

I have in an .xlsx file in a cell (formatted general) this entry "03.01.2019 16:00" (without the "), but I'm getting "03.01.2019 15:59". In the cell below i have "04.01.2019 18:00" and i get the right value.

I added one line in the SpreadsheetReader_XLSX.php file:
on line 841: $Seconds = $Seconds + 1;

// At this point time is a fraction of a day $Time = ($Value - (int)$Value); $Seconds = 0; if ($Time) { // Here time is converted to seconds // Some loss of precision will occur $Seconds = (int)($Time * 86400); $Seconds = $Seconds + 1; // I added this line }

Now i get every time right.
Please take not that i DON'T use seconds in my timestamps.

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

No branches or pull requests

1 participant