comment here

This commit is contained in:
ton
2023-03-18 20:03:34 +07:00
commit 4553a0a589
14513 changed files with 2685043 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
from datetime import date
from jsons._datetime_impl import to_str, RFC3339_TIME_PATTERN
def default_time_serializer(obj: date, **kwargs) -> str:
"""
Serialize the given time instance to a string. It uses the RFC3339
pattern.
:param obj: the time instance that is to be serialized.
:param kwargs: not used.
:return: ``time`` as an RFC3339 string.
"""
return to_str(obj, False, kwargs['fork_inst'],
RFC3339_TIME_PATTERN)