momentjs: how to get the date in a specific timezone
问题 In a nutshell I want moment to respect server's timezone. I've set my machine's timezone to Alaska but I'm passing a Brisbane timezone string to moment. Now I need moment.toDate to return a date instance in the same timezone as the one I pass in the moment constructor; e.g. m = moment("2016-11-20T08:00:00+10:00") m.format() // "2016-11-20T08:00:00+10:00" m.toDate() // Sat Nov 19 2016 13:00:00 GMT-0900 (AKST) I want to get a Date instance from moment that's in the input timezone; e.g. somehow