Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Fixed loss of timeZone when the parameters are passed as an object. #37

merged 1 commit into from

3 participants


No description provided.


This pull request passes (merged 912fb5e into bec0721).


I'm not sure I follow. You've moved one line after the other. How was the timezone lost when passed as an object?


Object passed to function in the cronTime variable. In the previous version cronTime variable extracts from object (cronTime) before timeZone variable and redefine it. In next line cronTime.timeZone always undefined because cronTime already string, not object with parameters.

@ncb000gt ncb000gt merged commit b74a8c0 into ncb000gt:master

You should have heard me when I went back to look at the code...I think I sounded like a wounded walrus...or at least what I'd imagine a wounded walrus to sound like.

That was a stupid mistake. Thanks for catching this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/cron.js
2  lib/cron.js
@@ -233,8 +233,8 @@ function CronJob(cronTime, onTick, onComplete, start, timeZone) {
onTick = cronTime.onTick;
onComplete = cronTime.onComplete;
start = cronTime.start;
- cronTime = cronTime.cronTime;
timeZone = cronTime.timeZone;
+ cronTime = cronTime.cronTime;
if (timeZone && !(CronDate.prototype.setTimezone)) console.log('You specified a Timezone but have not included the `time` module. Timezone functionality is disabled. Please install the `time` module to use Timezones in your application.');
Something went wrong with that request. Please try again.