Conditions | 1 |
Total Lines | 10 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | from datetime import date |
||
5 | def default_time_serializer(obj: date, **kwargs) -> str: |
||
6 | """ |
||
7 | Serialize the given time instance to a string. It uses the RFC3339 |
||
8 | pattern. |
||
9 | :param obj: the time instance that is to be serialized. |
||
10 | :param kwargs: not used. |
||
11 | :return: ``time`` as an RFC3339 string. |
||
12 | """ |
||
13 | return to_str(obj, False, kwargs['fork_inst'], |
||
14 | RFC3339_TIME_PATTERN) |
||
15 |