diff --git a/aqt/main.py b/aqt/main.py index 3644df94e..4a705033d 100644 --- a/aqt/main.py +++ b/aqt/main.py @@ -808,16 +808,23 @@ title="%s">%s''' % ( def newMsg(self, data): aqt.update.showMessages(self, data) - def clockIsOff(self): - showWarning("""\ + def clockIsOff(self, diff): + warn = _("""\ In order to ensure your collection works correctly when moved between \ -devices, Anki requires the system clock to be set correctly. Your system \ -clock appears to be wrong by more than 5 minutes. +devices, Anki requires your computer's internal clock to be set correctly. \ +The internal clock can be wrong even if your system is showing the correct \ +local time. -This can be because the \ -clock is slow or fast, because the date is set incorrectly, or because \ -the timezone or daylight savings information is incorrect. Please correct \ -the problem and restart Anki.""") +Please go to the time settings on your computer and check the following: + +- AM/PM +- Clock drift +- Day, month and year +- Timezone +- Daylight savings + +Difference to correct time: %d seconds.""") % diff + showWarning(warn) self.app.closeAllWindows() # Count refreshing diff --git a/aqt/update.py b/aqt/update.py index 66f8fd3d6..b31fd452c 100644 --- a/aqt/update.py +++ b/aqt/update.py @@ -1,14 +1,17 @@ # Copyright: Damien Elmes # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html +import urllib +import urllib2 +import time + from aqt.qt import * -import urllib, urllib2, time import aqt -import platform from aqt.utils import openLink -from anki.utils import json, isWin, isMac, platDesc +from anki.utils import json, platDesc from aqt.utils import showText + class LatestVersionFinder(QThread): def __init__(self, main): @@ -45,7 +48,7 @@ class LatestVersionFinder(QThread): self.emit(SIGNAL("newVerAvail"), resp['ver']) diff = resp['time'] - time.time() if abs(diff) > 300: - self.emit(SIGNAL("clockIsOff")) + self.emit(SIGNAL("clockIsOff"), diff) def askAndUpdate(mw, ver): baseStr = (