fix: getDates was omitting dates

pull/24/head
Sami Mokaddem 2017-12-07 09:17:22 +01:00
parent bb3ccf2815
commit d8d9d5a145
1 changed files with 2 additions and 0 deletions

View File

@ -58,6 +58,8 @@ class Users_helper:
t = datetime.datetime.fromtimestamp(float(t[1]))
if util.getDateStrFormat(t) == util.getDateStrFormat(date): #same day
to_return.append(t)
elif util.getDateStrFormat(t) > util.getDateStrFormat(date):
continue # timestamps should be sorted, skipping to reach wanted date
else:
break # timestamps should be sorted, no need to process anymore
return to_return