-
-
Notifications
You must be signed in to change notification settings - Fork 8k
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
Different date parse result in chrome and firefox. #1918
Comments
This is from my home pc. The OS setting is different from above.
chrome:
|
The result is wired. Because I installed the English window 10. And install and use the Chinese UI language, and set locale to Chinese PRC. And the installed language order is (Chinese,Hong Kong,English). But the timezone setting is always be "Beijing UTC+8" |
And the edge(not the new chrome edge) result:
|
I think this code may correct. |
Excel interprets date/time codes based on the timezone of the computer. 12:00 AM in an XLSX or XLS or XLSB file will be 12:00 AM if you open the file in New York or Los Angeles or Hong Kong or Beijing or Seoul. If no corrections are made for the timezone, then the results are likely incorrect outside of UTC. A cursory reading of exceljs/exceljs#486 suggests they push the problem of localization to the library user, which doesn't really address the underlying problem. |
After some digging, here's the conclusion: HK offset had a seconds component (according to https://www.timeanddate.com/time/zone/hong-kong/hong-kong and the IANA tz database it was +7:36:42 during 1899). The weird offset is technically correct. Chrome and nodejs appear to be rounding the offset, hence the difference in values between FF and Chrome. We've raised the issue with NodeJS nodejs/node#33306 As for how we fix this library, we're closing this issue in favor of #1565 (which reported a similar problem with Korea) |
in xlsx.js:
The
dnthresh
is different in firefox and chrome.Conside the code:
The firefox result is correct. For
gmt 805
, I think firefox's timezoneoffset is correct.The text was updated successfully, but these errors were encountered: