#Task.loop(time=...) with tzinfo doesn't trigger

1 messages · Page 1 of 1 (latest)

opaque basalt
#
@tasks.loop(time=datetime.time(15, tzinfo=tz.gettz('Europe/Paris')))```

This loop is not played when it is 15:00:00 and no error is displayed in the error output

There is only this error which is displayed when i kill the process 

```txt
Task exception was never retrieved
future: <Task finished name='Task-14' coro=<Loop._loop() done, defined at /home/erwan/.local/lib/python3.8/site-packages/discord/ext/tasks/__init__.py:159> exception=TypeError("can't compare offset-naive and offset-aware times")>
Traceback (most recent call last):
  File "/home/erwan/.local/lib/python3.8/site-packages/discord/ext/tasks/__init__.py", line 165, in _loop
    self._prepare_time_index()
  File "/home/erwan/.local/lib/python3.8/site-packages/discord/ext/tasks/__init__.py", line 603, in _prepare_time_index
    if time >= time_now:
TypeError: can't compare offset-naive and offset-aware times
keen lagoon
#

remove the timezone info and just use your local timezone

opaque basalt
#

I would like to have a cleaner code with 10 for 10am and not 9 for 10am

sonic trench
opaque basalt
#

But im not on UTC but UTC+1

#

In France

sonic trench
#

hmm

open igloo
opaque basalt
open igloo
#

oh