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
I'm trying to find out what's the best way to handle DST switches and I hope anyone could point me in the right direction. I'm using bull for fetching feeds at a set time. The backend server is set to UTC. Clients can set the time for the feed to be updated (fetched). The client is in the Europe/Amsterdam timezone, so CET in winter and CEST in summer. If the clients wants the feed to be updated each day at 06:00 this should always be 06:00 in their local timezone. Therefore, I made the code so that it subtracts the right number of hours to convert it to the right UTC hour (1 if it's currently CET, 2 if it's currently CEST).
If the clients wants the feed to be fetched at 06:00 and they set that time during the winter, 06:00 CET get's converted to 05:00 UTC and the cron runs just fine. However, if the DST is active, starting end of march, the cronjob still runs at 05:00 UTC, but this now is 07:00 CEST.
What would be the best way to handle this? I have tried playing around with the timezone (tz) property and I've looked in the cron-parser & luxon documentation as well, but I haven't been able to find out what's the best way to handle this.
Do I have to remove & add all cronjobs the day after DST started with their adjust UTC hour?
Bull version
4.7.0
Additional information
Server runs UTC, client is in Amsterdam (CET/CEST timezone).
The text was updated successfully, but these errors were encountered:
Description
I'm trying to find out what's the best way to handle DST switches and I hope anyone could point me in the right direction. I'm using bull for fetching feeds at a set time. The backend server is set to UTC. Clients can set the time for the feed to be updated (fetched). The client is in the Europe/Amsterdam timezone, so CET in winter and CEST in summer. If the clients wants the feed to be updated each day at 06:00 this should always be 06:00 in their local timezone. Therefore, I made the code so that it subtracts the right number of hours to convert it to the right UTC hour (1 if it's currently CET, 2 if it's currently CEST).
If the clients wants the feed to be fetched at 06:00 and they set that time during the winter, 06:00 CET get's converted to 05:00 UTC and the cron runs just fine. However, if the DST is active, starting end of march, the cronjob still runs at 05:00 UTC, but this now is 07:00 CEST.
What would be the best way to handle this? I have tried playing around with the timezone (tz) property and I've looked in the cron-parser & luxon documentation as well, but I haven't been able to find out what's the best way to handle this.
Do I have to remove & add all cronjobs the day after DST started with their adjust UTC hour?
Bull version
4.7.0
Additional information
Server runs UTC, client is in Amsterdam (CET/CEST timezone).
The text was updated successfully, but these errors were encountered: