var y = moment('2016-01-11T16:00:00');
console.log('UTC ' + moment().utc().format());
console.log('Local ' + moment().format());
console.log(y.format());
console.log(y.toISOString());
Above Code js Mit Moment gibt
UTC 2016-07-12T19:54:15Z
Local 2016-07-12T15:54:15-04:00
2016-01-11T16:00:00-05:00
2016-01-11T21:00:00.000Z
Warum ist die Anzeige -05: 00 in y.format Offset().
Wahrscheinlich ist Ihre Zeitzone -05: 00. –
Da Sie es nicht sagen, welches Format Sie wollen, so gibt es Ihnen die Standardeinstellung. Siehe: http://momentjs.com/docs/#/displaying/format/ – WillardSolutions
@Gothdo ist es -4: 00 (EST) – avi