rq-scheduler icon indicating copy to clipboard operation
rq-scheduler copied to clipboard

Use correct UTC settings for crontab

Open ross-spencer opened this issue 1 year ago • 2 comments

Connected to: https://github.com/rq/rq-scheduler/issues/299

ross-spencer avatar Oct 10 '23 16:10 ross-spencer

hi team, what is the last status about this task?

resulyrt93 avatar Feb 28 '24 23:02 resulyrt93

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?

Harsh-Maheshwari avatar Feb 29 '24 13:02 Harsh-Maheshwari