serialize_datetime() — fastapi Function Reference
Architecture documentation for the serialize_datetime() function in test_datetime_custom_encoder.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 9e7a1140_4d31_531d_9149_bdff2264fcff["serialize_datetime()"] 36822c4d_a5a9_70a5_3b62_be238b251f9d["ModelWithDatetimeField"] 9e7a1140_4d31_531d_9149_bdff2264fcff -->|defined in| 36822c4d_a5a9_70a5_3b62_be238b251f9d 4a2e1995_b5ba_18a5_57e1_3c34cb62d315["test_pydanticv2()"] 4a2e1995_b5ba_18a5_57e1_3c34cb62d315 -->|calls| 9e7a1140_4d31_531d_9149_bdff2264fcff style 9e7a1140_4d31_531d_9149_bdff2264fcff fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_datetime_custom_encoder.py lines 15–16
def serialize_datetime(self, dt_field: datetime):
return dt_field.replace(microsecond=0, tzinfo=timezone.utc).isoformat()
Domain
Subdomains
Defined In
Called By
Source
Frequently Asked Questions
What does serialize_datetime() do?
serialize_datetime() is a function in the fastapi codebase, defined in tests/test_datetime_custom_encoder.py.
Where is serialize_datetime() defined?
serialize_datetime() is defined in tests/test_datetime_custom_encoder.py at line 15.
What calls serialize_datetime()?
serialize_datetime() is called by 1 function(s): test_pydanticv2.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free