From 45ba3a280de7a903909fc48e542484fe0c266a8c Mon Sep 17 00:00:00 2001 From: Mariano Lopez Date: Thu, 9 Jul 2015 15:33:33 -0500 Subject: [PATCH] views.py: Changed date format to iso MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed the day format to iso. Also, the outdated field in the recipes views was changed from days to the date the recipe was last updated. Signed-off-by: Mariano Lopez Signed-off-by: Aníbal Limón --- rrs/views.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rrs/views.py b/rrs/views.py index 7fd2e8f..d583acb 100644 --- a/rrs/views.py +++ b/rrs/views.py @@ -207,7 +207,7 @@ def _get_recipe_list(milestone): recipe_last_updated_dict_all.get(recipe['id']) if recipe_last_updated: recipe_date = recipe_last_updated['date'] - outdated = (current_date - recipe_date.date()).days + outdated = recipe_date.date().isoformat() else: outdated = 'Unknown' else: @@ -360,13 +360,14 @@ def _get_recipe_upgrade_detail(recipe_upgrade): .count() > 0: is_recipe_maintainer = True + commit_date = recipe_upgrade.commit_date.date().isoformat() commit = recipe_upgrade.sha1[:10] commit_url = recipe_upgrade.recipe.layerbranch.layer.vcs_web_url + \ '/commit/?id=' + recipe_upgrade.sha1 rud = RecipeUpgradeDetail(recipe_upgrade.title, recipe_upgrade.version, \ - release_name, milestone_name, recipe_upgrade.commit_date, \ - maintainer_name, is_recipe_maintainer, commit, commit_url) + release_name, milestone_name, commit_date, maintainer_name, \ + is_recipe_maintainer, commit, commit_url) return rud