Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Scheduling Recurring Task not accounting for container time-zone #810

Closed
MwC-Trexx opened this issue Jan 3, 2023 · 1 comment · Fixed by #809
Closed

[BUG] Scheduling Recurring Task not accounting for container time-zone #810

MwC-Trexx opened this issue Jan 3, 2023 · 1 comment · Fixed by #809

Comments

@MwC-Trexx
Copy link

Describe the bug

When scheduling maintenance task (update yt-dlp) to run daily at 12:30am, the scheduled task appears to be setting at GMT time without TZData offset.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Tasks
  2. Click on Schedule (for update yt-dlp)
  3. Schedule time to Daily @ 12:30 AM (appears to be assuming GMT time here)
  4. Task shows an update scheduled for 6:30 PM (appears to have adjusted for TZ)

Expected behavior
Should not perform TZ adjustment on scheduled task time (or there is a display inconsistency)

Screenshots
If applicable, add screenshots to help explain your problem.

Environment
installed version: v4.3
Installation type: docker
Docker tag: nightly
Commit hash: 9c0a77c
Build date: 2022-12-27

Additional context
Running via TrueNas Scale/Docker-Compose (TrueCharts)
Container TZ set to America/Chicago (GMT -6).

@Tzahi12345
Copy link
Owner

I just tested this in a non-Docker environment and I'm not seeing this behavior.

Everything UI side is assuming your local timezone, and then one of two things happens:

  • If one-off, info is converted to a UNIX timestamp (conversion done by browser)
  • If recurring, we'll save the hours/minute info which will get consumed by the backend when it schedules the task (conversion done by backend)

What I guess is going on is the backend doesn't know it's in CST (despite you setting the TZ), and assumes it's in GMT-0. I don't have a container handy atm, but can you try one thing:

  1. Schedule a task, this time don't make it recurring
  2. See if the time you set is the same as the time you see
  3. Optionally, schedule the task to run (non-recurring) in a minute or two and see if it actually works

You do have a point though, in that when there's a mismatch in the backend vs. frontend timezone, the frontend one should be used. I updated the WIP PR I have for v4.3.1 to include that, which should solve the issue here: 8c63a78

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants