flashing colon sign

This commit is contained in:
Justin 2023-08-23 00:46:09 +08:00 committed by GitHub
parent 362efd041a
commit 16cf2ec73b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,6 +52,8 @@ time_colors = {
"Cyan": graphics.Color(0,255,255)
}
colon_visible = False
while True:
# Clear the canvas
canvas.Clear()
@ -76,6 +78,12 @@ while True:
else:
current_time = datetime.now(timezone).strftime("%H:%M")
if colon_visible:
current_time = current_time.replace(":", " ")
colon_visible = False
else:
colon_visible = True
current_weekday = datetime.now(timezone).strftime("%A")
current_date = datetime.now(timezone).strftime("%d %b %Y")