我有一个带有node-cron (0.3.2) 和node-time (0.8.2)的节点(v0.7.3-pre) 服务器:
var cronJob = require('cron').CronJob;
var cronJ = new cronJob({
cronTime: "00 29 16 6 * *",
onTick: function() {
console.log("Tick");
},
start:true,
timeZone: "America/Los_Angeles"
});
console.log(cronJ);
它运行,但 Cron 始终使用服务器时间(UTC),返回的 cron 是:
{ _callbacks: [ [Function] ],
onComplete: undefined,
cronTime:
{ source: '00 29 16 6 * *',
zone: undefined,
second: { '0': true },
minute: { '29': true },
hour: { '16': true },
dayOfWeek:
...
zone
设置为,undefined
我错过了什么吗?