From 6c6817563e7c09f9bc3682732074a7f0c6f01b03 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sun, 22 Mar 2020 17:32:34 +1000 Subject: [PATCH] fix sync error introduced by 69d8cdd9ed1e32683aabe1714ed6402a59fab4cd --- pylib/anki/schedv2.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pylib/anki/schedv2.py b/pylib/anki/schedv2.py index 0b8050887..62ddbc852 100644 --- a/pylib/anki/schedv2.py +++ b/pylib/anki/schedv2.py @@ -1393,11 +1393,14 @@ where id = ? self._rolloverHour(), ) - def _current_timezone_offset(self) -> Optional[int]: + def _current_timezone_offset(self) -> int: if self.col.server: return self.col.conf.get("localOffset", None) else: - return None + # note: while we could return None to sched_timing_today to have + # the backend calculate it, this function is also used to set + # localOffset, so it must not return None + return self.col.backend.local_minutes_west(intTime()) def _creation_timezone_offset(self) -> Optional[int]: return self.col.conf.get("creationOffset", None)