From c6066d74d39fa86643f01b36df779c2a59a1b525 Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@canonical.com>
Date: Wed, 25 Sep 2013 14:09:34 +0100
Subject: [PATCH] Change date format to seconds-since-epoch

---
 policies/policy.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/policies/policy.py b/policies/policy.py
index bc7e50f..bea9747 100644
--- a/policies/policy.py
+++ b/policies/policy.py
@@ -211,8 +211,7 @@ class AgePolicy(BasePolicy):
         if options.default_urgency not in mindays:
             raise ValueError("Missing age-requirement for default urgency (MINDAYS_%s)" % options.default_urgency)
         self._min_days_default = mindays[options.default_urgency]
-        # britney's "day" begins at 3pm
-        self._date_now = int(((time.time() / (60*60)) - 15) / 24)
+        self._date_now = int(time.time())
         self._dates = {}
         self._urgencies = {}
 
@@ -250,7 +249,7 @@ class AgePolicy(BasePolicy):
         elif self._dates[source_name][0] != source_data_srcdist.version:
             self._dates[source_name] = (source_data_srcdist.version, self._date_now)
 
-        days_old = self._date_now - self._dates[source_name][1]
+        days_old = (self._date_now - self._dates[source_name][1]) / 60 / 60 / 24
         min_days = self._min_days[urgency]
         age_info['age-requirement'] = min_days
         age_info['current-age'] = days_old