mirror of
https://github.com/Pythagora-io/gpt-pilot.git
synced 2026-01-10 13:37:55 -05:00
fix for issue No time zone found with key UTC
This commit is contained in:
@@ -116,7 +116,11 @@ class AnthropicClient(BaseLLMClient):
|
||||
except ValueError:
|
||||
return datetime.timedelta(seconds=5)
|
||||
|
||||
now = datetime.datetime.now(tz=zoneinfo.ZoneInfo("UTC"))
|
||||
try:
|
||||
now = datetime.datetime.now(tz=zoneinfo.ZoneInfo("UTC"))
|
||||
except zoneinfo.ZoneInfoNotFoundError:
|
||||
now = datetime.datetime.now(tz=datetime.timezone.utc)
|
||||
|
||||
return reset_time - now
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user