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

Proposed: A fix for a bug in uploader.py for scheduler #81

Open
JurijsNazarovs opened this issue Sep 15, 2023 · 0 comments
Open

Proposed: A fix for a bug in uploader.py for scheduler #81

JurijsNazarovs opened this issue Sep 15, 2023 · 0 comments

Comments

@JurijsNazarovs
Copy link

There is a bug in uploader.py when checking boundaries for scheduling time. Instead of

 min_schedule_time = datetime.datetime.utcnow() +

should use

import pytz
 min_schedule_time = datetime.datetime.now().astimezone(pytz.UTC).timestamp() +

The reason is because datetime.datetime.utcnow() will take current time and transfer to etc zone. E.g., if you live in zone -7 and it is 5am, it will make a min_schedule_time to be 12pm of UTC. Which will show an error "cannot schedule in 20 minutes", until you schedule something in advance for 7 hours 20 minutes.

@JurijsNazarovs JurijsNazarovs changed the title Fix bug in uploader.py for scheduler Proposed: A fix for a bug in uploader.py for scheduler Sep 24, 2023
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

No branches or pull requests

1 participant