mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
fix v2 timing being returned for v1 users
This commit is contained in:
parent
4e2e0d1b84
commit
966eb666f0
2 changed files with 6 additions and 1 deletions
|
@ -1385,11 +1385,14 @@ where id = ?
|
|||
return self.col.conf.get("rollover", 4)
|
||||
|
||||
def _timing_today(self) -> SchedTimingToday:
|
||||
roll: Optional[int] = None
|
||||
if self.col.schedVer() > 1:
|
||||
roll = self._rolloverHour()
|
||||
return self.col.backend.sched_timing_today(
|
||||
self.col.crt,
|
||||
self._creation_timezone_offset(),
|
||||
self._current_timezone_offset(),
|
||||
self._rolloverHour(),
|
||||
roll,
|
||||
)
|
||||
|
||||
def _current_timezone_offset(self) -> Optional[int]:
|
||||
|
|
|
@ -5,6 +5,7 @@ import copy
|
|||
import json
|
||||
import os
|
||||
import weakref
|
||||
from dataclasses import dataclass
|
||||
from typing import Any, Dict, Optional, Tuple
|
||||
|
||||
from anki.collection import _Collection
|
||||
|
@ -23,6 +24,7 @@ from anki.stdmodels import (
|
|||
from anki.utils import intTime
|
||||
|
||||
|
||||
@dataclass
|
||||
class ServerData:
|
||||
minutes_west: Optional[int] = None
|
||||
|
||||
|
|
Loading…
Reference in a new issue