experiments/lazy_serializer.py
def encode_datetime(cls, dt):
        """Serialize the given datetime.datetime object to a EPOCH seconds."""
        return {
            "__datetime__": True,
            "0": (dt - datetime.datetime(1970, 1, 1)).total_seconds(),
        }
Serialize the given datetime.datetime object to a EPOCH seconds.
Serialize the given datetime.datetime object to a EPOCH seconds.
Serialize the given datetime . datetime object to a EPOCH seconds .
def encode_datetime(cls, dt):
        return {
            "__datetime__": True,
            "0": (dt - datetime.datetime(1970, 1, 1)).total_seconds(),
        }
def encode_datetime ( cls , dt ) : return { "__datetime__" : True , "0" : ( dt - datetime . datetime ( 1970 , 1 , 1 ) ) . total_seconds ( ) , }
Serialize the given datetime.datetime object to a EPOCH seconds.
Serialize the given datetime . datetime object to a EPOCH seconds .
"""Serialize the given datetime.datetime object to a EPOCH seconds."""
cls
dt