Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clock module year %Y format-string invalid #780

Closed
DyslexicAtheist opened this issue Jul 21, 2020 · 3 comments · Fixed by #797
Closed

clock module year %Y format-string invalid #780

DyslexicAtheist opened this issue Jul 21, 2020 · 3 comments · Fixed by #797

Comments

@DyslexicAtheist
Copy link

Hi,

my configuration of the clock module looks like this (note the %Y format string):

    "clock": {
        "timezone": "Europe/Paris",
        "format": "{:%a, %b %d %Y} ",
        "format-alt": "{:%H:%M %Z} ",
        "tooltip": false
    },

this results in the following output (see lower right corner):

actual_1595316016_grim_rootwin

It is possible to use a workaround to get the desired result, which is to use %C%y:

"clock": {
    "timezone": "Europe/Paris",
    "format": "{:%a, %b %d %C%y} ",
    "format-alt": "{:%H:%M %Z} ",
    "tooltip": false
},

and then the formatting is correct:

expected_1595316133_grim_rootwin

waybar --version
Waybar v0.9.2-140-g759602a (branch 'master')

best regards,
~DA

@jamespeapen
Copy link

Does date +"%a, %b %d %Y" output the year correctly in your shell?

@DyslexicAtheist
Copy link
Author

@jamespeapen yes it does.
From my understanding Waybar doesn't use date command from the shell but gets pulled into Waybar/subprojects as explained in #594

@jamespeapen
Copy link

jamespeapen commented Aug 2, 2020

@DyslexicAtheist You're right. I was wondering if it was a locale issue. Turns out there was a bug in the date library (#565, HowardHinnant/date#525), but there's a fix - #715. It doesn't work if timezone is specified though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants