DenoDDeno
Powered by
RqverR
Denoβ€’16mo agoβ€’
1 reply
Rqver

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
date
returns the correct time in the correct time zone. Printing
Intl.DateTimeFormat().resolvedOptions().timeZone
Intl.DateTimeFormat().resolvedOptions().timeZone
within the program also correctly prints the time zone (
Pacific/Auckland
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")
})
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Deno cron timeout
HekekHHekek / help
17mo ago
Deno.cron error
angelcapitalpAangelcapitalp / help
2y ago
Deno cron instrumentation
AbhiPrasadAAbhiPrasad / help
3y ago
Testing Deno cron locally?
macMmac / help
2y ago