querybook
querybook copied to clipboard
fix: mismatched scheduled run times
-
Fixes an issue in NextRun.tsx to specify that the given cron is based on UTC time and not Local time, and to calculate the next run time accordingly.
-
Also changes "Runs At" to display UTC time instead of Local time to match scheduler, since the selected hour/minute and resultant cron are based on UTC time. Labels to indicate Local/UTC time are also added to the "Runs At" and "Next Run" text for clarification.
-
Added an informational message to the recurrence scheduler page and "Next Run" so that users can check the next run time while they are creating/editing a schedule.
Thanks for the PR.
- what you said the bug is on
Next run
, while the change you made is onRuns at
- I think we can have both
Runs at
andNext Run
to use local time, and it's a good idea to add the trailing(Local time)
. - Instead of showing
Run Options not Set
, we can just hide it, but only showing it when the schedule is enabled.
@jczhong84 We noticed a number of scenarios where the Runs At is incorrect, like monthly/yearly where the local time ends up being on a different date. Also it doesn't account for daylight savings time, which can vary depending on where the user is located.
So it seemed like the easiest fix was to leave the Runs At description in UTC, and let Next Run do the local conversions (which it does correctly).
@jczhong84 We noticed a number of scenarios where the Runs At is incorrect, like monthly/yearly where the local time ends up being on a different date. Also it doesn't account for daylight savings time, which can vary depending on where the user is located.
So it seemed like the easiest fix was to leave the Runs At description in UTC, and let Next Run do the local conversions (which it does correctly).
thanks for the context!
put some comments and please resolve the build failure