@@ -63,7 +63,7 @@ const CalendarFetcherUtils = {
63
63
event . start . tz = "" ;
64
64
Log . debug ( `ical offset=${ current_offset } date=${ date } ` ) ;
65
65
mm = moment ( date ) ;
66
- let x = parseInt ( moment ( new Date ( ) ) . utcOffset ( ) ) ;
66
+ let x = parseInt ( moment ( Date . now ( ) ) . utcOffset ( ) ) ;
67
67
Log . debug ( `net mins=${ current_offset * 60 - x } ` ) ;
68
68
69
69
mm = mm . add ( x - current_offset * 60 , "minutes" ) ;
@@ -141,7 +141,7 @@ const CalendarFetcherUtils = {
141
141
Log . debug ( `There are ${ Object . entries ( data ) . length } calendar entries.` ) ;
142
142
Object . entries ( data ) . forEach ( ( [ key , event ] ) => {
143
143
Log . debug ( "Processing entry..." ) ;
144
- const now = new Date ( ) ;
144
+ const now = Date . now ( ) ;
145
145
const today = moment ( ) . startOf ( "day" ) . toDate ( ) ;
146
146
const future
147
147
= moment ( )
@@ -323,7 +323,7 @@ const CalendarFetcherUtils = {
323
323
324
324
// Get the offset of today where we are processing
325
325
// This will be the correction, we need to apply.
326
- let nowOffset = new Date ( ) . getTimezoneOffset ( ) ;
326
+ let nowOffset = Date . now ( ) . getTimezoneOffset ( ) ;
327
327
// For full day events, the time might be off from RRULE/Luxon problem
328
328
// Get time zone offset of the rule calculated event
329
329
let dateoffset = date . getTimezoneOffset ( ) ;
@@ -479,7 +479,7 @@ const CalendarFetcherUtils = {
479
479
}
480
480
} else {
481
481
// It's not a fullday event, and it is in the past, so skip.
482
- if ( ! fullDayEvent && endDate < new Date ( ) ) {
482
+ if ( ! fullDayEvent && endDate < Date . now ( ) ) {
483
483
return ;
484
484
}
485
485
0 commit comments