from datetime import datetime


class Timestamp(float):
    def __new__(cls, value=None):
        return super().__new__(
            cls, datetime.utcnow().timestamp() if value is None else value
        )

    def to_date(self) -> datetime:
        return datetime.utcfromtimestamp(self)

    def __repr__(self):
        return f"<{type(self).__name__} {self}>"

    def __str__(self):
        return self.to_date().isoformat(" ")

[((11, 15, 11, 46), 'datetime.datetime.utcfromtimestamp', 'datetime.utcfromtimestamp', ({(11, 41, 11, 45): 'self'}, {}), '(self)', False, 'from datetime import datetime\n'), ((7, 17, 7, 34), 'datetime.datetime.utcnow', 'datetime.utcnow', ({}, {}), '()', False, 'from datetime import datetime\n')]