Skip to content

Commit

Permalink
fix (again and finally) issue #3
Browse files Browse the repository at this point in the history
  • Loading branch information
marticliment committed Oct 5, 2021
1 parent 113a590 commit 237f44b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions elevenclock/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import time, sys, threading, datetime, webbrowser
from pynput.keyboard import Controller, Key

version = 1.3
version = 1.4
lastTheme = 0
seconddoubleclick = False

Expand Down Expand Up @@ -43,7 +43,9 @@ def readRegedit(aKey, sKey, default, storage=winreg.HKEY_CURRENT_USER):
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", "%$").replace("H", "%H").replace("$", "%H").replace("hh", "%I").replace("h", "%I").replace("mm", "%M").replace("m", "%M").replace("tt", "%p").replace("t", "%p")
print(timeMode)
timeMode = timeMode.replace("HH", "%$").replace("H", "%H").replace("$", "H").replace("hh", "%I").replace("h", "%I").replace("mm", "%M").replace("m", "%M").replace("tt", "%p").replace("t", "%p")
print(timeMode)

dateTimeFormat = dateTimeFormat.replace("%d/%m/%Y", dateMode).replace("%H:%M", timeMode)
print(dateTimeFormat)
Expand Down

0 comments on commit 237f44b

Please sign in to comment.