Moment.js timezone valueOf returning wrong timestamp

后端 未结 2 832
迷失自我
迷失自我 2021-01-07 01:45

I want to use moment.js to shift an input moment to a different timezone and get its timestamp.

moment.tz(moment(), \"Pacific/Auckland\").valueOf();
<         


        
2条回答
  •  广开言路
    2021-01-07 02:14

    var time  = moment.tz("2016-04-25 12:00", "Pacific/Auckland");
    

    then

    time.format();
    

    Try this

提交回复
热议问题