My code below works fine on PC Chrome but not on Chrome on iOS
const convertedLocalTimeString = convertedLocalTime.toLocaleString();
console.log(`Visitor local time ${visitorLocalTimeString} and converted local time ${convertedLocalTimeString}`);
const convertedTime = new Date(convertedLocalTimeString);
console.log(`converted time ${convertedTime}`) //invalid date on console
I only ask because Chrome on iOS is different than Chrome anywhere else. Apple forces the webKit rendering engine on all browsers when run in iOS, and though I’ve seen some indications that the javascript engine is the same across the versions of Chrome, I’ve also seen some that say iOS requires the same javascript engine for all browsers like they do the rendering engine.
Are you sure this will give you the expected result? As normally dates with “-” are formatted day-month-year while dates with “/” are formatted as month/day/year