jobqueue: Add docstring note about intervals and DST (#1397)

Fixes #1381
This commit is contained in:
Noam Meltzer 2019-04-27 21:10:56 +03:00 committed by Jasmin Bom
parent 2cde878d1e
commit 9d005d5124

View file

@ -172,6 +172,11 @@ class JobQueue(object):
:class:`telegram.ext.Job`: The new ``Job`` instance that has been added to the job :class:`telegram.ext.Job`: The new ``Job`` instance that has been added to the job
queue. queue.
Notes:
`interval` is always respected "as-is". That means that if DST changes during that
interval, the job might not run at the time one would expect. It is always recommended
to pin servers to UTC time, then time related behaviour can always be expected.
""" """
job = Job(callback, job = Job(callback,
interval=interval, interval=interval,
@ -202,6 +207,11 @@ class JobQueue(object):
:class:`telegram.ext.Job`: The new ``Job`` instance that has been added to the job :class:`telegram.ext.Job`: The new ``Job`` instance that has been added to the job
queue. queue.
Notes:
Daily is just an alias for "24 Hours". That means that if DST changes during that
interval, the job might not run at the time one would expect. It is always recommended
to pin servers to UTC time, then time related behaviour can always be expected.
""" """
job = Job(callback, job = Job(callback,
interval=datetime.timedelta(days=1), interval=datetime.timedelta(days=1),