You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All timezones supported by the javascript Date object is available. By default Croner use the timezone of the current environment. If you want to schedule in a different timezone. You can pass the timezone parameter:
console.log("Current UTC datetime:",newDate().toUTCString());console.log("Next 5 seconds past 10:00:00 (Pattern '* * 10 * * *0') in Asia/Kolkata, seen from UTC. ");require("croner")("* * 10 * * *",{timezone: "Asia/Kolkata"}).enumerate(5).forEach(e=>console.log(e.toUTCString()));/*> node tstest.jsCurrent UTC datetime: Sat, 05 Feb 2022 19:16:22 GMTNext 5 seconds past 10:00:00 (Pattern '* * 10 * * *0') in Asia/Kolkata, seen from UTC. Sun, 06 Feb 2022 04:30:00 GMTSun, 06 Feb 2022 04:30:01 GMTSun, 06 Feb 2022 04:30:02 GMTSun, 06 Feb 2022 04:30:03 GMTSun, 06 Feb 2022 04:30:04 GMT*/
Is it already present to allow timezone parameters to pass it or only Europe is allowed?
The text was updated successfully, but these errors were encountered: