Change date format to seconds-since-epoch

pre-rebase-2016-12-12
Colin Watson 11 years ago committed by Martin Pitt
parent 97fc6cb356
commit c6066d74d3

@ -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

Loading…
Cancel
Save