javascriptlaterjs

Later.js - text parse is o.k but interval didnt work


Situation: in my code I am working with later js for interval by time with the text parser. I parse 3 diffrent cases: hourly, daily, weekly the parsing in all 3 cases is good! (return schduale.error = -1).

problam: daily and weekly didn't working for me if I am sets it to the close time example: if the time now is 1:45 pm in tuesday I defined: daily: at "01:48 pm also at 01:50 pm" weekly: "at 01:50 pm am on Tuesday and Wednsday "

how can i fix this?


Solution

  • the problam solved ! It was time zone that didnt sync between my time to later js. all you need to do is to add the commend:

    const later = require ('later'); //the reqiure you already have
    later.date.localTime() 
    

    There is no any doc on this in later js. but i found this in issues :https://github.com/bunkat/later/issues/95

    good luck!