IfcOpenShell date util now supports converting to IFC2X3 date entities

This commit is contained in:
Dion Moult
2021-02-17 21:12:04 +11:00
parent d7f289bc8a
commit ab102176cc
@@ -45,3 +45,8 @@ def datetime2ifc(dt, ifc_type):
return dt.date().isoformat()
elif ifc_type == "IfcTime":
return dt.time().isoformat()
elif ifc_type == "IfcCalendarDate":
return {"DayComponent": dt.day, "MonthComponent": dt.month, "YearComponent": dt.year}
elif ifc_type == "IfcLocalTime":
# TODO implement timezones
return {"HourComponent": dt.hour, "MinuteComponent": dt.minute, "SecondComponent": dt.second}