mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 16:28:01 -05:00
Promotion date cutoff should be from now if promotion is still live.
This commit is contained in:
@@ -470,6 +470,9 @@ class PromotedLinkTraffic(RedditTraffic):
|
||||
self.history = []
|
||||
return
|
||||
|
||||
now = datetime.datetime.utcnow().replace(minute=0, second=0,
|
||||
microsecond=0)
|
||||
end = min(end, now)
|
||||
cutoff = end - datetime.timedelta(days=31)
|
||||
start = max(start, cutoff)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user