我有2个输入字符串:
20181030T150000
Europe/Berlin
如何使用moment.js从UTC中创建日期?到目前为止,我得到了什么:
var jun = moment('20181030T150000', "YYYYMMDD'T'hhmmss");
var sd = jun.tz('Europe/Berlin')
console.log(jun.toDate());
console.log(sd.toDate())
<script src="https://momentjs.com/downloads/moment.js"></script>
<script src="https://momentjs.com/downloads/moment-timezone-with-data.js"></script>