sWhy is iPhone IOS showing invalid date for momentjs

前端 未结 3 1295
独厮守ぢ
独厮守ぢ 2021-01-28 19:59

I have a datepicker which was returning a moment object that was always in UTC timezone. I needed to do some logic on this date, but always wanted it in the users local timezone

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-28 20:24

    I had figured out that it's the 'a' flag in the format string. I changed it to 'YYYY-MM-DDTHH:mm:ss' and it worked perfectly. Safari must not like am/pm data

提交回复
热议问题