Open boredstiff opened 7 years ago
I haven't seen this before, unfortunately. You can set a break point and see what start date it is pulling in or try setting one explicitly in the .next() function call.
I'll give it a shot sometime in the next few days if I go back to the project that was using this and will follow up. Thanks!
It doesn't work for me too. Code
const later = require('later');
later.date.localTime();
let schedule = later.parse.text('every 1 min');
let times = later.schedule(schedule).next(10);
console.log(times);
Result
[ 2018-03-26T10:30:30.909Z,
2018-03-26T10:31:00.000Z,
2018-03-26T10:32:00.000Z,
2018-03-26T10:33:00.000Z,
2018-03-26T10:34:00.000Z,
2018-03-26T10:35:00.000Z,
2018-03-26T10:36:00.000Z,
2018-03-26T10:37:00.000Z,
2018-03-26T10:38:00.000Z,
2018-03-26T10:39:00.000Z ]
Expected result (timezone Europe/Rome)
[ 2018-03-26T12:30:30.909Z,
2018-03-26T12:31:00.000Z,
2018-03-26T12:32:00.000Z,
2018-03-26T12:33:00.000Z,
2018-03-26T12:34:00.000Z,
2018-03-26T12:35:00.000Z,
2018-03-26T12:36:00.000Z,
2018-03-26T12:37:00.000Z,
2018-03-26T12:38:00.000Z,
2018-03-26T12:39:00.000Z ]
seems to be returning the following for me:
So it appears that - on initialization - it's picking up the correct year, but starting on January 1st - even though today is January 15th.
I've double-checked but can't find anything that I've skipped - any clues?
Thanks!