diff --git a/britney2/policies/policy.py b/britney2/policies/policy.py index bd4b14d..98258c5 100644 --- a/britney2/policies/policy.py +++ b/britney2/policies/policy.py @@ -182,7 +182,12 @@ class AgePolicy(BasePolicy): self._min_days_default = None # initialised later # britney's "day" begins at 7pm (we want aging to occur in the 22:00Z run and we run Britney 2-4 times a day) # NB: _date_now is used in tests - self._date_now = int(((time.time() / (60*60)) - 19) / 24) + time_now = time.time() + if hasattr(self.options, 'fake_runtime'): + time_now = int(self.options.fake_runtime) + self.logger.info("overriding runtime with fake_runtime %d"%time_now) + + self._date_now = int(((time_now / (60*60)) - 19) / 24) self._dates = {} self._urgencies = {} self._default_urgency = self.options.default_urgency