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
|
lowestInDay = 0
|
||||||
now = list(time.localtime(time.time()))
|
now = list(time.localtime(time.time()))
|
||||||
now[3] = 23; now[4] = 59
|
now[3] = 23; now[4] = 59
|
||||||
self.endOfDay = time.mktime(now)
|
self.endOfDay = time.mktime(now) + self.deck.utcOffset
|
||||||
t = time.time()
|
t = time.time()
|
||||||
all = self.deck.s.all("""
|
all = self.deck.s.all("""
|
||||||
select interval, combinedDue
|
select interval, combinedDue
|
||||||
from cards where reps > 0 and priority != 0""")
|
from cards where reps > 0 and priority != 0""")
|
||||||
for (interval, due) in all:
|
for (interval, due) in all:
|
||||||
day=int(interval)
|
day=int(round(interval))
|
||||||
days[day] = days.get(day, 0) + 1
|
days[day] = days.get(day, 0) + 1
|
||||||
indays = int((due - self.endOfDay)
|
indays = int(round((due - self.endOfDay)
|
||||||
/ 86400.0)
|
/ 86400.0))
|
||||||
next[indays] = next.get(indays, 0) + 1
|
next[indays] = next.get(indays, 0) + 1
|
||||||
if indays < lowestInDay:
|
if indays < lowestInDay:
|
||||||
lowestInDay = indays
|
lowestInDay = indays
|
||||||
|
|
Loading…
Reference in a new issue