0

When parsing the date in safari, the date varies with time zone. This issue occurs only in safari browser, but in other browsers like chrome, firefox it is working fine.

Find the screenshots from the console window of safari and chrome browsers below.

Safari Screenshot:

Safari

Chrome screenshot:

enter image description here

kindly post your valuable suggestion, to get me out of this issue.

Note My data source will be in string format as mentioned above.

Dharanidharan
  • 1,038
  • 1
  • 9
  • 15
  • 1
    I'm a bit unclear about what you're supposedly demonstrating here. There's one input in Safari producing two lines of output…?! There's the same date being parsed twice in Chrome (also) resulting in two very different dates…? I don't know how you get to these results and why one is more correct than the other. – deceze Nov 30 '17 at 14:11
  • 1
    Safari incorrectly parses ISO 8601 format data and time strings without a timezone as UTC. They should be parsed as local. – RobG Nov 30 '17 at 23:06
  • Dates are a bit random in browsers. And support is terrible. Safari and IE really make a mess of it. Try using momentjs instead, it works amazingly well. https://momentjs.com/ – Trevor Dec 01 '17 at 16:55

0 Answers0