We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8984dd commit 22a8d7cCopy full SHA for 22a8d7c
django_celery_beat/models.py
@@ -392,9 +392,13 @@ def from_schedule(cls, schedule):
392
393
def due_start_time(self, start_time):
394
start, ends_in, now = self.schedule.remaining_delta(start_time)
395
- if (str(start.tzinfo) == str(now.tzinfo) and
396
- now.utcoffset() != start.utcoffset()):
+
+ same_tz = str(start.tzinfo) == str(now.tzinfo)
397
+ different_offset = now.utcoffset() != start.utcoffset()
398
399
+ if same_tz and different_offset:
400
start = start.replace(tzinfo=now.tzinfo)
401
402
return start + ends_in
403
404
0 commit comments