mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
graphs now pay attention to the "shift midnight" setting.
This commit is contained in:
parent
b08833b6b6
commit
4ba12dc753
1 changed files with 4 additions and 4 deletions
|
@ -48,16 +48,16 @@ class DeckGraphs(object):
|
|||
lowestInDay = 0
|
||||
now = list(time.localtime(time.time()))
|
||||
now[3] = 23; now[4] = 59
|
||||
self.endOfDay = time.mktime(now)
|
||||
self.endOfDay = time.mktime(now) + self.deck.utcOffset
|
||||
t = time.time()
|
||||
all = self.deck.s.all("""
|
||||
select interval, combinedDue
|
||||
from cards where reps > 0 and priority != 0""")
|
||||
for (interval, due) in all:
|
||||
day=int(interval)
|
||||
day=int(round(interval))
|
||||
days[day] = days.get(day, 0) + 1
|
||||
indays = int((due - self.endOfDay)
|
||||
/ 86400.0)
|
||||
indays = int(round((due - self.endOfDay)
|
||||
/ 86400.0))
|
||||
next[indays] = next.get(indays, 0) + 1
|
||||
if indays < lowestInDay:
|
||||
lowestInDay = indays
|
||||
|
|
Loading…
Reference in a new issue