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 a6cf7e8 commit 2bf030eCopy full SHA for 2bf030e
1 file changed
durabletask/worker.py
@@ -1675,7 +1675,10 @@ def create_timer_internal(
1675
1676
# Normalize timezone-aware datetimes to naive UTC so they can be safely
1677
# compared against and combined with the orchestration's naive UTC clock.
1678
- if final_fire_at.tzinfo is not None:
+ # A datetime is only truly aware when utcoffset() returns a value; a
1679
+ # tzinfo whose utcoffset() is None is still naive and must be left as-is
1680
+ # (calling astimezone() on it would raise ValueError).
1681
+ if final_fire_at.utcoffset() is not None:
1682
final_fire_at = final_fire_at.astimezone(timezone.utc).replace(tzinfo=None)
1683
1684
next_fire_at: datetime = final_fire_at
0 commit comments