Error parsing Dates in browsers with non-US location (Chrome) #2837
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#2837
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When parsing fields of xlsx files as dates in Chrome with a non-US location
we're getting a few seconds offsets from original Dates.
For example: We are getting a
2022-01-02 23:59:50
result for a2022-01-03 00:00:00
dateThe function we're using is
The issue exists when locale is set to Mumbai or Philippines, it’s unclear what locales are exhaustively affected. Issue appears to be intermittent as well.
To replicate this issue, you have to change your browser locale using the Sensor feature in the dev tools:
CMD + Shift + P
Type Sensors and choose the option Show Sensors by pressing Enter
In the Sensors tab in the console, change the location to Mumbai and reload the page.
This ultimately stems from a Chrome bug https://bugs.chromium.org/p/v8/issues/detail?id=7863 the date handling will have to change to work around the problem
This should have been fixed in the 0.20.0 release -- please update (https://docs.sheetjs.com/docs/getting-started/installation/) and let us know if the issue reoccurs