HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/alt/python37/lib/python3.7/site-packages/jsons/serializers/default_time.py
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)