Skip to content

Commit 466ffe1

Browse files
committed
Update the schema datetime filed json encoder
1 parent 2202e11 commit 466ffe1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/common/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class SchemaBase(BaseModel):
2525
use_enum_values=True,
2626
json_encoders={
2727
datetime: lambda x: timezone.to_str(timezone.from_datetime(x))
28-
if x.tzinfo is not None
28+
if x.tzinfo is not None and x.tzinfo != timezone.tz_info
2929
else timezone.to_str(x)
3030
},
3131
)

0 commit comments

Comments
 (0)