خرید بک لینک

Vote count: 0

I want to convert a local date object to a date object in another timezone and this is what I have:

moment("2016-08-04T23:30:37Z").tz("Asia/Hong_Kong").format("M/DD/YYYY h:mm a")

>>"8/05/2016 7:30 am"

but if I do

moment("2016-08-04T23:30:37Z").tz("Asia/Hong_Kong").toDate()

>>Thu Aug 04 2016 16:30:37 GMT-0700 (PDT)

As you can see, I can format the moment object to however I like, but how do I retu it to a date object again?

asked 45 secs ago

برچسب: نویسنده: استخدام کار تاريخ: جمعه 15 مرداد 1395 ساعت: 7:26

صفحه بندی