node-cron icon indicating copy to clipboard operation
node-cron copied to clipboard

When dst starts, it's not fired. And when dst ends, it's fired twice.

Open tjpgt opened this issue 3 years ago • 1 comments

Hello, thanks for the project, I have used it for a while and it help me a lot.

I didn't think much about day light saving before because I live in a country without it.

But now, I'm working on a project used in America and Europe, so I have to deal with it.

I find that when dst starts, the cron may not fire the job and fire the next day.

For example, if I have a job at 2:30, and the dst starts with 01:59:00->03:00:00, then it will skip the day. And if I have a job at 1:30, and the dst ends with 01:59:59->01:00:00, then it will fire twice.

Actually, I don't know what the proper behavior is. What about your alarm clock's behavior on your phone?

Can we have some config to change the behavior ?

tjpgt avatar Apr 01 '21 08:04 tjpgt

And I've found some linux cron's behavior. If I have a job at 2:30, and dst starts with 01:59:00->03:00:00,it will fire at 03:00:00.(I think it's still a little surprising) And it won't fire twice when dst ends.

tjpgt avatar Apr 01 '21 09:04 tjpgt