Clock module doesn't change with system timezone change
Right now, I'm in Argentina (ART timezone) coming from Los Angeles (PDT timezone). My system clock updated automatically -- when I'm in GNOME, the time shows correctly, the date command shows the time correctly, as well as tty-clock, swaylock, timedatectl, etc. However, Waybar's clock module is still stuck in my old timezone.
happened to me too today, do you have testing repo enabled? if yes, the problem comes from "core-testing/tzdata" version 2024b-1 downgrading to 2024a-2 solved the issue with waybar for me.
I don't have the testing repo enabled -- my version is 2024a-2.
I have the same problem, also no testing repo installed just the regular package.
well tzdata-2024b-1 was just released to core. and so I have the same issue with my waybar clock and I currently have no means of downgrade. this time it defaulted to UTC for me (down from a UTC+3 region)
there's also an error/warning when starting waybar:
[2024-09-08 14:37:19.653] [warning] Timezone: Europe/Berlin. std::chrono::tzdb: cannot locate zone: Europe/Berlin
If you need the older tzdata package well here you have ! just go to the letter T scroll all the way down and download the older package ! https://archive.archlinux.org/packages/
Again, the older version doesn't work. I think this is a bug with waybar's implementation.
I also have this problem and if I try to set the timezone i get:
[2024-09-08 15:30:26.444] [warning] Timezone: Europe/Rome. std::chrono::tzdb: cannot locate zone: Europe/Rome
I hope for a fix :)
there's also an error/warning when starting waybar:
[2024-09-08 14:37:19.653] [warning] Timezone: Europe/Berlin. std::chrono::tzdb: cannot locate zone: Europe/Berlin
strange... I don't get any timezone errors
also downgrading my tzdata package did fix it for me
I haven't moved a single meter, however...
I believe this is a C++ standard library bug -- I filed an issue for libc++, and it seems that libstdc++ fixed the bug (but just haven't shipped a version containing the fix).
https://github.com/llvm/llvm-project/issues/107779
For now, should Waybar maybe switch to using the date command (or some library that uses it)?
It was literally driving me crazy, I thought I had something wrong with my configuration. I hope they fix it soon, it's quite annoying to have a late time on the clock.
I just updated Waybar and am also experiencing this issue. As suggested by @eeelbrens, downgrading tzdata has fixed it for now.
And again, that doesn't work for everyone. Furthermore, downgrading system libraries generally isn't rhe best idea.
Yes, I’m aware. I only wanted to document that this solution worked for me too.
Just commenting that I am also experiencing this issue as of yesterday, probably after running pacman -Syu in arch by the sounds of it.
I've experienced this issue after one of the system updates. Downgrading tzdata to version 2024-a1 fixed the problem.
even downgrading to 2024-a2 would fix it
Obviously not a permanent or complete solution, but I've added this for now as a stopgap to my config:
"custom/clock": {
"format": " {}",
"exec": "date +'%I:%M'",
"interval": 1
},
Thanks to tzdata devs, I'm 1 hour younger now. My condolences to people living in UTC- time zones.
Just wanted to chime in - downgrading tzdata makes me old again.
Thanks for your work in this!
Updated to tzdata 2024b-2 and i am happy to say it now works as expected
Well, the latest gcc update fixed the issue on Arch Linux without tzdata downgrading.
yeah I did check and update both packages and it's been fixed @ThatOneCalculator I guess time to close that issue now
@eeelbrens I think you guys were having a different issue from me.
I'm currently on Waybar 0.11, tzdata 2024b-2, and I'm STILL getting the original timezone issue.
The current time is actually 3:33 PM (15:33).
This is NOT about it being at UTC -- this is about it being stuck in my old timezone.
This now seems to be resolved
My solucion (for portuguese):
I created a script "dia-semana.sh" (in script folder)
#!/bin/bash
dias=("Dom" "Seg" "Ter" "Qua" "Qui" "Sex" "Sáb")
meses=("JAN" "FEV" "MAR" "ABR" "MAI" "JUN" "JUL" "AGO" "SET" "OUT" "NOV" "DEZ")
echo "<U+F073> ${dias[$(date +%w)]}, $(date +%d)/${meses[$(date +%m)-1]}/$(date +%Y)
<U+F017> $(date +%H:%M:%S)"
in then (config.jsonc):
"modules-left": [
// "clock",
"custom/date",
"hyprland/workspaces"
],
"custom/date": {
"exec": "~/.config/waybar/scripts/dia-semana.sh",
"interval": 1
},
Result: