Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

Clock module doesn't change with system timezone change

Open ThatOneCalculator opened this issue 1 year ago • 22 comments

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.

image

image

ThatOneCalculator avatar Sep 06 '24 15:09 ThatOneCalculator

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.

pbosab avatar Sep 06 '24 18:09 pbosab

I don't have the testing repo enabled -- my version is 2024a-2.

ThatOneCalculator avatar Sep 06 '24 19:09 ThatOneCalculator

I have the same problem, also no testing repo installed just the regular package.

RedBlizard avatar Sep 08 '24 12:09 RedBlizard

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)

eeelbrens avatar Sep 08 '24 12:09 eeelbrens

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

grgpw avatar Sep 08 '24 12:09 grgpw

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/

RedBlizard avatar Sep 08 '24 12:09 RedBlizard

Again, the older version doesn't work. I think this is a bug with waybar's implementation.

ThatOneCalculator avatar Sep 08 '24 13:09 ThatOneCalculator

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 :)

samuelemusiani avatar Sep 08 '24 13:09 samuelemusiani

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

eeelbrens avatar Sep 08 '24 14:09 eeelbrens

also downgrading my tzdata package did fix it for me

eeelbrens avatar Sep 08 '24 14:09 eeelbrens

I haven't moved a single meter, however... immagine

alba4k avatar Sep 08 '24 20:09 alba4k

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

steveWang avatar Sep 08 '24 21:09 steveWang

For now, should Waybar maybe switch to using the date command (or some library that uses it)?

ThatOneCalculator avatar Sep 08 '24 23:09 ThatOneCalculator

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.

3ri4nG0ld avatar Sep 09 '24 01:09 3ri4nG0ld

I just updated Waybar and am also experiencing this issue. As suggested by @eeelbrens, downgrading tzdata has fixed it for now.

bradrn avatar Sep 09 '24 04:09 bradrn

And again, that doesn't work for everyone. Furthermore, downgrading system libraries generally isn't rhe best idea.

ThatOneCalculator avatar Sep 09 '24 10:09 ThatOneCalculator

Yes, I’m aware. I only wanted to document that this solution worked for me too.

bradrn avatar Sep 09 '24 10:09 bradrn

Just commenting that I am also experiencing this issue as of yesterday, probably after running pacman -Syu in arch by the sounds of it.

robertsbd avatar Sep 09 '24 11:09 robertsbd

I've experienced this issue after one of the system updates. Downgrading tzdata to version 2024-a1 fixed the problem.

Kamiksss avatar Sep 09 '24 14:09 Kamiksss

even downgrading to 2024-a2 would fix it

eeelbrens avatar Sep 09 '24 15:09 eeelbrens

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
	},

ThatOneCalculator avatar Sep 09 '24 18:09 ThatOneCalculator

Thanks to tzdata devs, I'm 1 hour younger now. My condolences to people living in UTC- time zones.

VladP812 avatar Sep 09 '24 18:09 VladP812

Just wanted to chime in - downgrading tzdata makes me old again.

Thanks for your work in this!

krulf avatar Sep 10 '24 09:09 krulf

Updated to tzdata 2024b-2 and i am happy to say it now works as expected

Magnitudexx avatar Sep 11 '24 06:09 Magnitudexx

Well, the latest gcc update fixed the issue on Arch Linux without tzdata downgrading.

adnanzareef avatar Sep 11 '24 07:09 adnanzareef

yeah I did check and update both packages and it's been fixed @ThatOneCalculator I guess time to close that issue now

eeelbrens avatar Sep 11 '24 11:09 eeelbrens

@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).

image

This is NOT about it being at UTC -- this is about it being stuck in my old timezone.

ThatOneCalculator avatar Sep 15 '24 18:09 ThatOneCalculator

This now seems to be resolved

ThatOneCalculator avatar Oct 28 '24 17:10 ThatOneCalculator

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:

Image

lypeInvictvs avatar Jun 09 '25 19:06 lypeInvictvs