datetime.time' object has no attribute 'time' code example
Example: 'datetime.datetime' object has no attribute 'total_seconds'
def timestamp(self):
"Return POSIX timestamp as float"
if self._tzinfo is None:
s = self._mktime()
return s + self.microsecond / 1e6
else:
return (self - _EPOCH).total_seconds()