querybook icon indicating copy to clipboard operation
querybook copied to clipboard

fix: mismatched scheduled run times

Open lilyli9 opened this issue 1 year ago • 3 comments

  • 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. Screen Shot 2023-03-08 at 4 11 01 PM

  • 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. Screen Shot 2023-03-08 at 4 10 21 PM Screen Shot 2023-03-08 at 4 10 36 PM

lilyli9 avatar Mar 09 '23 00:03 lilyli9

Thanks for the PR.

  • what you said the bug is on Next run, while the change you made is on Runs at
  • I think we can have both Runs at and Next 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 avatar Apr 07 '23 05:04 jczhong84

@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).

baumandm avatar Apr 07 '23 14:04 baumandm

@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

jczhong84 avatar Apr 26 '23 04:04 jczhong84