Skip to content

Hour format #433

Answered by Peeecha
Potopi asked this question in Q&A
Jan 2, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Classic case of ghost character that is left on the screen, happens when the new string is shorter than it was before.
A simple hacky tweak would be to format the time to fill the width to max length.
Changing this line:

value=f"{babel.dates.format_time(date_now, format=time_format, locale=lc_time)}"

to:
value=f"{babel.dates.format_time(date_now, format=time_format, locale=lc_time):>8}"

This would work if you are using medium format (XX:XX:XX), which looks like you are. You can also left align it with :<8, if thats preferred.

Another option, if you are happy with the heading 0, is to just update your theme b…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Potopi
Comment options

Answer selected by Potopi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants