A simple new Date() logic behaves differently on Chrome iOS in contrast to other platforms (mac, android, debian etc) - all Chrome packages are recent updates), as the jsfiddle here demonstrates. Why is that and is there a simple fix for this?
My local timezone is Eastern Standard. As I create a Date object with an ISO8601 timestamp string:
If I use
new Date('2018-01-01T10:00:00')
chrome 64.0.3282.112 on iOS11.2.2 (an iPhone6+ and an iPadAir2) assumes it's UTC and displays this:
Mon Jan 01 2018 05:00:00 GMT-0500 (EST)
whereas,
- MacOSx10.10.3 chrome 64.0.3282.167
- ubuntu16.04 chrome 64.0.3282.186
android8.0.0 chrome 64.0.3282.137, they all assume it's my local timezone and display this:
Mon Jan 01 2018 10:00:00 GMT-0500 (EST)
If I do specify timezone in the string timestamp
new Date('2018-01-01T10:00:00-05:00')
chrome on all four platforms display this:
Mon Jan 01 2018 10:00:00 GMT-0500 (EST)