aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Casagrande <milo.casagrande@linaro.org>2014-12-08 17:52:34 +0100
committerMilo Casagrande <milo.casagrande@linaro.org>2014-12-08 17:52:34 +0100
commitc9b0ae0be27161450dd2b455827013b2ab477a25 (patch)
treef3201f0c168cc076bfe9d1a4afba4e89b1a00d7d
parent8b2353e7d349a6b236023c641c38a4ed64a6f1ce (diff)
downloadkernel-ci-backend-build-reimport.tar.gz
Add creation date when importing from file.build-reimport
Change-Id: I90874dbb89e53235524b9d471eb7a80e49817e3c
-rw-r--r--app/utils/bootimport.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/utils/bootimport.py b/app/utils/bootimport.py
index a92a1dc..6da4077 100644
--- a/app/utils/bootimport.py
+++ b/app/utils/bootimport.py
@@ -190,6 +190,10 @@ def _parse_boot_from_file(boot_log, database):
boot_doc = modbt.BootDocument(
board, job, kernel, defconfig, lab_name, defconfig_full, arch)
+ boot_doc.created_on = datetime.datetime.fromtimestamp(
+ os.stat(boot_log).st_mtime, tz=bson.tz_util.utc
+ )
+
_update_boot_doc_from_json(boot_doc, boot_json, json_pop_f)
_update_boot_doc_ids(boot_doc, database)
except (OSError, TypeError, IOError), ex: