When using new Date() on ios phones, the time format cannot be ‘2021-03-17 12:00:00’ with ‘-‘, it must be converted first. Such as time = (‘ 2021-03-17 12:00:00.) replace (/ – / g, ‘/’); time= “2021/03/17 12:00:00”