[removed] Convert a UTC Date() object to the local timezone

前端 未结 4 763
醉酒成梦
醉酒成梦 2021-01-18 13:20

I have a Date() object that contains a UTC date, which I need converted to the users local timezone. Does anybody know how I could do this? :-)

4条回答
  •  无人共我
    2021-01-18 14:03

    I usually create a new Date object and use the Date.setUTC* functions to copy the date information.

提交回复
热议问题