Javascript 为什么MomentJS的输出值不反映UTC时间?

Javascript 为什么MomentJS的输出值不反映UTC时间?,javascript,momentjs,Javascript,Momentjs,我正在尝试以UTC格式获取特定的日期/时间。示例代码 const today = moment().tz('America/New_York') const tomorrow = today.add(1, 'days') const formatTime = today.format('YYYY-MM-DD') const time = '7:00 pm' const deliveryTime = moment(`${formatTime} ${time}`) conso

我正在尝试以UTC格式获取特定的日期/时间。示例代码

  const today = moment().tz('America/New_York')
  const tomorrow = today.add(1, 'days')
  const formatTime = today.format('YYYY-MM-DD')
  const time = '7:00 pm'
  const deliveryTime = moment(`${formatTime} ${time}`)
  console.log(deliveryTime.utc().format())
当我开始使用时,是否应该将其作为输出
2019-10-01T19:00:00Z
假设这一天是2019-10-02T13:00:00Z

这是因为Node.js的日期实现吗


使用矩.js将日期时间转换为UTC的正确方法是什么?

可能在特定时区中没有创建的。
deliveryTime
的副本。可能在特定时区中没有创建的。
deliveryTime
的副本。