rq-scheduler
rq-scheduler copied to clipboard
Use correct UTC settings for crontab
Connected to: https://github.com/rq/rq-scheduler/issues/299
hi team, what is the last status about this task?
FutureWarning: Version 0.22.0+ of crontab will use datetime.utcnow() and
datetime.utcfromtimestamp() instead of datetime.now() and
datetime.fromtimestamp() as was previous. This had been a bug, which will be
remedied. If you would like to keep the *old* behavior:
`ct.next(..., default_utc=False)` . If you want to use the new behavior *now*:
`ct.next(..., default_utc=True)`. If you pass a datetime object with a tzinfo
attribute that is not None, timezones will *just work* to the best of their
ability. There are tests...
next_time = cron.next(now=now, return_datetime=True)
Is this warning being solved in this thread?