mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 10:51:13 +00:00
Fix Ruff UP017 (datetime-timezone-utc)
https://docs.astral.sh/ruff/rules/datetime-timezone-utc/
This commit is contained in:
@@ -76,11 +76,7 @@ class IfcExporter:
|
|||||||
def set_header(self):
|
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.name = os.path.basename(self.ifc_export_settings.output_file)
|
||||||
self.file.wrapped_data.header.file_name.time_stamp = (
|
self.file.wrapped_data.header.file_name.time_stamp = (
|
||||||
datetime.datetime.utcnow()
|
datetime.datetime.utcnow().replace(tzinfo=datetime.UTC).astimezone().replace(microsecond=0).isoformat()
|
||||||
.replace(tzinfo=datetime.timezone.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.preprocessor_version = "IfcOpenShell {}".format(ifcopenshell.version)
|
||||||
self.file.wrapped_data.header.file_name.originating_system = "{} {}".format(
|
self.file.wrapped_data.header.file_name.originating_system = "{} {}".format(
|
||||||
|
|||||||
Reference in New Issue
Block a user