mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-02-10 14:07:29 +00:00
Change date format to seconds-since-epoch
This commit is contained in:
parent
8b140b3900
commit
158d7ca479
@ -213,8 +213,7 @@ class AgePolicy(BasePolicy):
|
||||
if options.default_urgency not in mindays: # pragma: no cover
|
||||
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 = {}
|
||||
|
||||
@ -252,7 +251,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…
x
Reference in New Issue
Block a user