-
-
Notifications
You must be signed in to change notification settings - Fork 465
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
fix: tasks loop infinitely when tzinfo
is neither None
nor UTC
#2196
Conversation
Signed-off-by: Jeon Hojin <36477282+SorameHato@users.noreply.github.com>
Signed-off-by: Jeon Hojin <36477282+SorameHato@users.noreply.github.com>
Signed-off-by: Jeon Hojin <36477282+SorameHato@users.noreply.github.com>
Signed-off-by: Jeon Hojin <36477282+SorameHato@users.noreply.github.com>
Signed-off-by: Jeon Hojin <36477282+SorameHato@users.noreply.github.com>
Co-authored-by: JustaSqu1d <89910983+JustaSqu1d@users.noreply.github.com> Signed-off-by: Jeon Hojin <36477282+SorameHato@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't tested, just making a stylistic review
Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Signed-off-by: Jeon Hojin <36477282+SorameHato@users.noreply.github.com>
Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Signed-off-by: Jeon Hojin <36477282+SorameHato@users.noreply.github.com>
Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Signed-off-by: Jeon Hojin <36477282+SorameHato@users.noreply.github.com>
Co-authored-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com> Signed-off-by: Jeon Hojin <36477282+SorameHato@users.noreply.github.com>
It works fine for me. (both tested on Windows 10 Education 22H2, Python 3.11.1/Ubuntu 18.04 LTS, Python 3.11.4, tested at KST 00:34(UTC 15:34)) Test Log
|
That's not the point here, We have to test it as well lol. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested
Hi, been having the same issue. |
Signed-off-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com>
Signed-off-by: Dorukyum <53639936+Dorukyum@users.noreply.github.com>
tzinfo
is not None
or UTC, the task loops infinitely tzinfo
is neither None
nor UTC
Summary
Please see issue #2187
If task's tzinfo is not UTC and task's time is between UTC 00:00 and destination timezone's 00:00, it loop infinitely until UTC 00:00(countries in east of UTC timezone like Eastern Europe, Korea, Japan, Australia) or destination timezone's 00:00(countries in west of UTC timezone like USA, Canada) comes.
Test Log (KST 08:47 = UTC 23:47)
I resolved that bug by making
datetime.datetime.now
in_get_next_sleep_time
ofdiscord.ext.tasks
to represents timezone of task's time.Test Log (KST 08:48 = UTC 23:48)
Source Code of Test File
To sum up with table :
✅ : Work properly
∞ : Infinity loop is occured
❌ : Doesn't work
Information
examples, ...).
Checklist
type: ignore
comments were used, a comment is also left explaining why.