Fix Ruff UP017 (datetime-timezone-utc)

https://docs.astral.sh/ruff/rules/datetime-timezone-utc/
This commit is contained in:
Andrej
2025-05-28 16:20:48 +05:00
parent 62a0c258b2
commit 03f5ee653b
+1 -5
View File
@@ -76,11 +76,7 @@ class IfcExporter:
def set_header(self):
self.file.wrapped_data.header.file_name.name = os.path.basename(self.ifc_export_settings.output_file)
self.file.wrapped_data.header.file_name.time_stamp = (
datetime.datetime.utcnow()
.replace(tzinfo=datetime.timezone.utc)
.astimezone()
.replace(microsecond=0)
.isoformat()
datetime.datetime.utcnow().replace(tzinfo=datetime.UTC).astimezone().replace(microsecond=0).isoformat()
)
self.file.wrapped_data.header.file_name.preprocessor_version = "IfcOpenShell {}".format(ifcopenshell.version)
self.file.wrapped_data.header.file_name.originating_system = "{} {}".format(