aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Casagrande <milo.casagrande@linaro.org>2015-03-02 17:50:42 +0100
committerMilo Casagrande <milo.casagrande@linaro.org>2015-03-02 17:50:42 +0100
commitd2399907205707d5841f0c7b0f58a6b54c317cf5 (patch)
tree57363b654c5523574ac9e5111d0d2fe235074662
parent08ec740865e130bcf9da9c29a443e27f9ece919e (diff)
Give defconfig the same time value.
Change-Id: I62f106b68a503a9765fdf091b43858383acc4088
-rw-r--r--app/utils/docimport.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/utils/docimport.py b/app/utils/docimport.py
index 716c0e2..df70a01 100644
--- a/app/utils/docimport.py
+++ b/app/utils/docimport.py
@@ -217,6 +217,11 @@ def _traverse_defconf_dir(
defconfig_doc.id = doc_id
if c_date:
defconfig_doc.created_on = c_date
+ else:
+ # Give the defconfig doc the same date as the job one.
+ # In this way all defconfigs will have the same date regardless
+ # of when they were saved on the file system.
+ defconfig_doc.created_on = job_doc.created_on
else:
utils.LOG.warn("No build data file found in '%s'", real_dir)
@@ -321,9 +326,6 @@ def _parse_build_data(data_file, job, kernel, defconfig_dir):
)
defconfig_doc.dirname = defconfig_dir
- defconfig_doc.created_on = datetime.datetime.fromtimestamp(
- os.stat(data_file).st_mtime, tz=bson.tz_util.utc
- )
defconfig_doc.arch = data_pop(models.ARCHITECTURE_KEY, None)
defconfig_doc.build_log = data_pop(models.BUILD_LOG_KEY, None)