@@ -97,7 +97,7 @@ module.exports = NodeHelper.create({
9797 this . scheduledJobs . push ( { notificationJob : notificationJob } ) ;
9898
9999 this . log ( this . name + " has scheduled " + notificationSchedule . notification ) ;
100- this . log ( this . name + " will next send " + notificationSchedule . notification + " at " + notificationJob . nextDate ( ) . toDate ( ) ) ;
100+ this . log ( this . name + " will next send " + notificationSchedule . notification + " at " + new Date ( notificationJob . nextDate ( ) ) ) ;
101101 }
102102 } ,
103103
@@ -131,11 +131,11 @@ module.exports = NodeHelper.create({
131131 this . scheduledJobs . push ( { module : module , schedule : moduleSchedule , showJob : showJob , hideJob : hideJob } ) ;
132132
133133 // Store next dates
134- if ( i === 0 || showJob . nextDate ( ) . toDate ( ) < nextShowDate ) {
135- nextShowDate = new Date ( showJob . nextDate ( ) ) ; //.toDate();
134+ if ( i === 0 || new Date ( showJob . nextDate ( ) ) < nextShowDate ) {
135+ nextShowDate = new Date ( showJob . nextDate ( ) ) ;
136136 }
137- if ( i === 0 || hideJob . nextDate ( ) . toDate ( ) < nextShowDate ) {
138- nextHideDate = new Date ( hideJob . nextDate ( ) ) ; //.toDate();
137+ if ( i === 0 || new Date ( hideJob . nextDate ( ) ) < nextShowDate ) {
138+ nextHideDate = new Date ( hideJob . nextDate ( ) ) ;
139139 nextDimLevel = moduleSchedule . dimLevel ;
140140 }
141141 }
@@ -186,8 +186,8 @@ module.exports = NodeHelper.create({
186186 this . scheduledJobs . push ( { schedule : globalSchedule , showJob : showJob , hideJob : hideJob } ) ;
187187
188188 // Check next dates
189- var nextShowDate = showJob . nextDate ( ) . toDate ( ) ;
190- var nextHideDate = hideJob . nextDate ( ) . toDate ( ) ;
189+ var nextShowDate = new Date ( showJob . nextDate ( ) ) ;
190+ var nextHideDate = new Date ( hideJob . nextDate ( ) ) ;
191191 var now = new Date ( ) ;
192192 if ( nextShowDate > now && nextHideDate > nextShowDate ) {
193193 if ( globalSchedule . dimLevel > 0 ) {
@@ -233,7 +233,7 @@ module.exports = NodeHelper.create({
233233 function ( ) {
234234 self . log ( self . name + " is sending " + notification + " to " + options . target ) ;
235235 self . sendSocketNotification ( notification , options ) ;
236- self . log ( self . name + " will next send " + notification + " to " + options . target + " at " + this . nextDate ( ) . toDate ( ) + ' based on "' + cronTime + '"' ) ;
236+ self . log ( self . name + " will next send " + notification + " to " + options . target + " at " + new Date ( this . nextDate ( ) ) + ' based on "' + cronTime + '"' ) ;
237237 } ,
238238 function ( ) {
239239 self . log ( self . name + " has completed the " + action + " job for " + options . target + ' based on "' + cronTime + '"' ) ;
0 commit comments