diff --git a/elevenclock/__init__.py b/elevenclock/__init__.py index 68e55a8d..7542420f 100644 --- a/elevenclock/__init__.py +++ b/elevenclock/__init__.py @@ -37,12 +37,14 @@ def readRegedit(aKey, sKey, default, storage=winreg.HKEY_CURRENT_USER): dateTimeFormat = "%H:%M\n%d/%m/%Y" dateMode = readRegedit(r"Control Panel\International", "sShortDate", "dd/MM/yyyy") -dateMode = dateMode.replace("dd", "%d").replace("d", "%d").replace("MMM", "%b").replace("MM", "%m").replace("M", "%m").replace("yyyy", "%Y").replace("yy", "%y") +print(dateMode) +dateMode = dateMode.replace("dd", "%#").replace("d", "%d").replace("#", "d").replace("MMM", "%b").replace("MM", "%m").replace("M", "%m").replace("yyyy", "%Y").replace("yy", "%y") timeMode = readRegedit(r"Control Panel\International", "sShortTime", "H:mm") -timeMode = timeMode.replace("HH", "%H").replace("H", "%H").replace("mm", "%M").replace("m", "%M") +timeMode = timeMode.replace("HH", "%H").replace("H", "%H").replace("hh", "%I").replace("h", "%I").replace("mm", "%M").replace("m", "%M").replace("tt", "%p").replace("t", "%p") dateTimeFormat = dateTimeFormat.replace("%d/%m/%Y", dateMode).replace("%H:%M", timeMode) +print(dateTimeFormat) class RestartSignal(QObject):