Rqver
Rqver2mo ago

Deno.cron not respecting time zones

Hi, I have a cron job running using Deno#cron that is set to run at 0300 every day. This is a small program that runs on a linux/ubuntu VPS, however the same behaviour occurs on Windows 11. Latest version of Deno and Ubuntu 24.04. The timezone of the VPS is correctly set to NZDT and running date returns the correct time in the correct time zone. Printing Intl.DateTimeFormat().resolvedOptions().timeZone within the program also correctly prints the time zone (Pacific/Auckland). Deno runs this cron job at 1600 my time every day, which is 0300 UTC.
Deno.cron("Clear active members", "0 3 * * *", () => {
console.log("Test")
})
Deno.cron("Clear active members", "0 3 * * *", () => {
console.log("Test")
})
1 Reply
Rqver
RqverOP2mo ago
Just found the note on Deno.cron only using UTC my bad. Will leave the post here for someone to search for in the future but close it 👍

Did you find this page helpful?