def canonical_time(self):
if settings.USE_TZ:
return int((self.uploaded_at - datetime(1970, 1, 1, tzinfo=timezone.utc)).total_seconds())
else:
return int((self.uploaded_at - datetime(1970, 1, 1)).total_seconds())
评论列表
文章目录