diff --git a/openpype/tools/publisher/publish_report_viewer/window.py b/openpype/tools/publisher/publish_report_viewer/window.py index 84b25467b4..9dbe991201 100644 --- a/openpype/tools/publisher/publish_report_viewer/window.py +++ b/openpype/tools/publisher/publish_report_viewer/window.py @@ -59,7 +59,7 @@ class PublishReportItem: created_at_obj = datetime.datetime.strptime( content["created_at"], "%Y-%m-%d %H:%M:%S" ) - created_at = self.date_obj_to_timestamp(created_at_obj) + created_at = created_at_obj.timestamp() self.content = content self.report_path = report_path @@ -201,15 +201,6 @@ class PublishReportItem: self.content = content self.file_modified = file_modified - @staticmethod - def date_obj_to_timestamp(date_obj): - if hasattr(date_obj, "timestamp"): - return date_obj.timestamp() - - # Python 2 support - epoch = datetime.datetime.fromtimestamp(0) - return (date_obj - epoch).total_seconds() - @classmethod def _fix_content(cls, content, file_modified=None): """Fix content for backward compatibility of older report items.