From edec065feec21b85033bb34b6c9b68853fe0e4da Mon Sep 17 00:00:00 2001 From: hjlarry Date: Sun, 28 Sep 2025 09:10:21 +0800 Subject: [PATCH] fix can't subtract offset-naive and offset-aware datetimes --- api/services/workflow/rate_limiter.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/services/workflow/rate_limiter.py b/api/services/workflow/rate_limiter.py index df7eba4584..1ccb4e1961 100644 --- a/api/services/workflow/rate_limiter.py +++ b/api/services/workflow/rate_limiter.py @@ -77,6 +77,7 @@ class TenantDailyRateLimiter: # Get next midnight in UTC next_midnight = datetime.combine(utc_now.date() + timedelta(days=1), time.min) + next_midnight = next_midnight.replace(tzinfo=UTC) return int((next_midnight - utc_now).total_seconds())