1#You probably have
2
3import datetime
4
5#change that to
6
7from datetime import datetime
1def timestamp(self):
2 "Return POSIX timestamp as float"
3 if self._tzinfo is None:
4 s = self._mktime()
5 return s + self.microsecond / 1e6
6 else:
7 return (self - _EPOCH).total_seconds()