【发布时间】:2016-11-06 01:19:23
【问题描述】:
我正在使用node-datetime 库。我想以年-月-日时-分-秒等格式获取当前日期时间
例如:2016-07-04 17:19:11
var dateTime = require('node-datetime');
var dt = dateTime.create();
dt.format('m/d/Y H:M:S');
console.log(new Date(dt.now()));
但我的结果如:
2016 年 7 月 4 日星期一 17:19:11 GMT+0700(东南亚标准时间)
【问题讨论】: