From 98f4c8518ecb35350f70ae753bb136821e533065 Mon Sep 17 00:00:00 2001 From: gpioto Date: Mon, 26 Aug 2019 14:12:09 -0300 Subject: [PATCH] Casting default timestamp template to integer The documentation of IFC indicates that the timestamp must be of type Integer. (https://standards.buildingsmart.org/IFC/DEV/IFC4_2/FINAL/HTML/link/ifctimestamp.htm) If not, it cause some problems importing the generated IFC file in some platforms --- src/ifcopenshell-python/ifcopenshell/template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/template.py b/src/ifcopenshell-python/ifcopenshell/template.py index fdc34aec07..ec253ad414 100644 --- a/src/ifcopenshell-python/ifcopenshell/template.py +++ b/src/ifcopenshell-python/ifcopenshell/template.py @@ -66,7 +66,7 @@ DEFAULTS = { "application_version": lambda d: main.version, "project_globalid": lambda d: compress(uuid.uuid4().hex), "schema_identifier": lambda d: main.schema_identifier, - "timestamp": lambda d: time.time(), + "timestamp": lambda d: int(time.time()), "timestring": lambda d: time.strftime("%Y-%m-%dT%H:%M:%S", time.gmtime(d.get('timestamp') or time.time())) }