sWhy is iPhone IOS showing invalid date for momentjs

前端 未结 3 1306
独厮守ぢ
独厮守ぢ 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:17

    follow this format. year should be at the beginning. have to use "/" instead of "-". cannot use "MMM" for month

    YYYY/MM/DD hh:mm A
    

提交回复
热议问题