iamkun / iamkun/dayjs

Parsing of ISO string not correctly formatted in Firefox

Open
#1,673 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

Hi folks,

I get an ISO string from the backend like this: _2022-03-10T17:00:00+01:00_. When parsing it in Chrome (v95.0.4638.54 (Official Build)) and Safari (v14.1.1 (16611.2.7.1.4) with `dayjs('2022-03-10T17:00:00+01:00')` it results in the following output:

Screenshot 2021-10-21 at 11 45 01

This is, compared with the ISO string, the correct output. When logging this string in Firefox, however, it results in this output:

Screenshot 2021-10-21 at 11 44 27

As you can see, I did set my locale correctly. I tried it with a timestamp as well. Same output. Is there something I am missing? I read something about a deprecated standard of ISO strings. Could that be the case here?

Thank you guys in advance for any help!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.