mirror of
https://github.com/langgenius/dify.git
synced 2026-04-29 15:08:06 +08:00
fix can't subtract offset-naive and offset-aware datetimes
This commit is contained in:
@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user