【发布时间】:2020-09-06 22:55:38
【问题描述】:
当尝试使用来自特定时区的日期时,我收到以下错误:
const dayInGermany = moment().tz("2020-01-31 13:00", "Europe/Berlin").toISOString();
Moment Timezone has no data for 2020-01-31 13:00. See http://momentjs.com/timezone/docs/#/data-loading/.
页面https://momentjs.com/timezone/docs/#/data-loading/ 说:
In Node.js, all the data is preloaded. No additional code is needed for loading data.
如何将时区数据添加到我的项目中?
【问题讨论】:
标签: node.js momentjs moment-timezone