Add note on UTC to run_{repeating, once} (#1854)

This commit is contained in:
Bibo-Joshi 2020-03-31 00:05:08 +02:00 committed by GitHub
parent 61a66a32c8
commit d65558888e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -129,10 +129,11 @@ class JobQueue(object):
* :obj:`datetime.timedelta` will be interpreted as "time from now" in which the * :obj:`datetime.timedelta` will be interpreted as "time from now" in which the
job should run. job should run.
* :obj:`datetime.datetime` will be interpreted as a specific date and time at * :obj:`datetime.datetime` will be interpreted as a specific date and time at
which the job should run. which the job should run. If the timezone (``datetime.tzinfo``) is ``None``, UTC
will be assumed.
* :obj:`datetime.time` will be interpreted as a specific time of day at which the * :obj:`datetime.time` will be interpreted as a specific time of day at which the
job should run. This could be either today or, if the time has already passed, job should run. This could be either today or, if the time has already passed,
tomorrow. tomorrow. If the timezone (``time.tzinfo``) is ``None``, UTC will be assumed.
context (:obj:`object`, optional): Additional data needed for the callback function. context (:obj:`object`, optional): Additional data needed for the callback function.
Can be accessed through ``job.context`` in the callback. Defaults to ``None``. Can be accessed through ``job.context`` in the callback. Defaults to ``None``.
@ -172,10 +173,11 @@ class JobQueue(object):
* :obj:`datetime.timedelta` will be interpreted as "time from now" in which the * :obj:`datetime.timedelta` will be interpreted as "time from now" in which the
job should run. job should run.
* :obj:`datetime.datetime` will be interpreted as a specific date and time at * :obj:`datetime.datetime` will be interpreted as a specific date and time at
which the job should run. which the job should run. If the timezone (``datetime.tzinfo``) is ``None``, UTC
will be assumed.
* :obj:`datetime.time` will be interpreted as a specific time of day at which the * :obj:`datetime.time` will be interpreted as a specific time of day at which the
job should run. This could be either today or, if the time has already passed, job should run. This could be either today or, if the time has already passed,
tomorrow. tomorrow. If the timezone (``time.tzinfo``) is ``None``, UTC will be assumed.
Defaults to ``interval`` Defaults to ``interval``
context (:obj:`object`, optional): Additional data needed for the callback function. context (:obj:`object`, optional): Additional data needed for the callback function.