Skip to content
Snippets Groups Projects
Commit 37855543 authored by nkour's avatar nkour
Browse files

history window for old days is ok now

parent 6fa7c779
No related branches found
No related tags found
No related merge requests found
......@@ -220,14 +220,15 @@ class Logger:
start_of_day = self.get_unix_time_from_date(year, month, day)
now = int(time.time())
seconds_in_a_day = 86400 # 60 * 60 * 24
last_second_of_day = start_of_day + seconds_in_a_day - 1
cur.execute('''
SELECT contact_name, time, kind, show, message FROM logs
WHERE jid_id = %d
AND time BETWEEN %d AND %d
ORDER BY time
''' % (jid_id, start_of_day, now))
''' % (jid_id, start_of_day, last_second_of_day))
results = cur.fetchall()
return results
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment