mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 14:17:13 -05:00
ensure today and dayCutoff are integers
https://github.com/dae/anki/pull/272
This commit is contained in:
parent
488c867afb
commit
86fb47d49d
1 changed files with 2 additions and 2 deletions
|
|
@ -1232,14 +1232,14 @@ where id = ?
|
|||
if date < datetime.datetime.today():
|
||||
date = date + datetime.timedelta(days=1)
|
||||
|
||||
stamp = time.mktime(date.timetuple())
|
||||
stamp = int(time.mktime(date.timetuple()))
|
||||
return stamp
|
||||
|
||||
def _daysSinceCreation(self):
|
||||
startDate = datetime.datetime.fromtimestamp(self.col.crt)
|
||||
startDate = startDate.replace(hour=self.col.conf.get("rollover", 4),
|
||||
minute=0, second=0, microsecond=0)
|
||||
return (time.time() - time.mktime(startDate.timetuple())) // 86400
|
||||
return int((time.time() - time.mktime(startDate.timetuple())) // 86400)
|
||||
|
||||
# Deck finished state
|
||||
##########################################################################
|
||||
|
|
|
|||
Loading…
Reference in a new issue