@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
#Task.loop(time=...) with tzinfo doesn't trigger
1 messages · Page 1 of 1 (latest)
remove the timezone info and just use your local timezone
if i remove tzinfo I will have to put hour=9 to trigger task at 10am
I would like to have a cleaner code with 10 for 10am and not 9 for 10am
That's doesn't make sense tho. Why would you need to do that
Bc if I dont specify tzinfo its taking UTC time
But im not on UTC but UTC+1
In France
hmm
or just use tasks.loop(seconds=int)
No bc i want to trigger loop at 15pm each day and not each 24h uptime
oh