Waybar icon indicating copy to clipboard operation
Waybar copied to clipboard

clock module showing UTC time instead of the local time.

Open rik-x2907 opened this issue 1 year ago • 10 comments

I have set the timezone in the config as well but nothing changed. the date command is showing the local time.

rik-x2907 avatar Sep 09 '24 04:09 rik-x2907

See #3575 . It might be related to tzdata. Downgrading the tzdata can solve it.

Xqark avatar Sep 09 '24 05:09 Xqark

Yes same error after tzdata update. timedatectl shows the right "Local time".

dR3b avatar Sep 09 '24 07:09 dR3b

The same, waybar shows only UTC time

steepboy avatar Sep 09 '24 09:09 steepboy

i got this problem too, i try the timezone too but it don't help, i trye the timedatectl too and it give me the right info.

seocamo avatar Sep 09 '24 14:09 seocamo

i got this problem too, i try the timezone too but it don't help, i trye the timedatectl too and it give me the right info.

@seocamo I found a way to fix it, you need to downgrade tzdate to 2024a- 2. Here is a link to past versions https://archive.archlinux.org/packages/t/tzdata/ (Correction, it wasn't even me, it was written above)

steepboy avatar Sep 09 '24 14:09 steepboy

i got this problem too, i try the timezone too but it don't help, i trye the timedatectl too and it give me the right info.

@seocamo I found a way to fix it, you need to downgrade tzdate to 2024a- 2. Here is a link to past versions https://archive.archlinux.org/packages/t/tzdata/ (Correction, it wasn't even me, it was written above)

Thx, yes this works

a little more info, i was looking on the source and it had a env TZ that it look at, 4 months ago, so i try to set it and it don't change anything, so it look like it is one of the commits 10 months ago ?? and then i see this message is there missing data in the tzdata package or do waybar use it wrong ??

seocamo avatar Sep 09 '24 15:09 seocamo

UTC time shown in waybar also in my case. (waybar-0.10.4-2, tzdata-2024b-1 on Arch).

  • Noteworthy: datetimecontrol, i3status do show right time (they must refer to tzdata?)
  • Tried to specify "timezone": "Europe/Stockholm" explicitly in the clock module of ~/config/waybar/config, did not help
  • Downgrading to tzdata-2024a-2 fixed it for me too.

Obzervation: tzdata on Arch is listed to be required by glibc and Python, so it must be used by many other programs, seems to be a very essential part. I'm inclined to think that waybar access to tzdata is somehow broken.

tjavdar avatar Sep 09 '24 16:09 tjavdar

Downgrading tzdata caused some breakage for me. Not complete system breakage, but some programs started segfaulting after the downgrade.

odomingao avatar Sep 09 '24 21:09 odomingao

Spent the whole day thinking it was 2 hours earlier, we gotta do something :face_with_head_bandage:

choucavalier avatar Sep 09 '24 21:09 choucavalier

waybar-v0.10.4 tzdata-2024b-1

I am experiencing this issue on two different machines, both running Garuda Hyprland. Yesterday, I updated the packages on my laptop and noticed that the time was 5 hours ahead.

Today, when I used my desktop, Waybar was showing the correct time. I ran pkill waybar && hyprctl dispatch exec waybar to verify that Waybar would still display the correct time, which it did. However, after updating my desktop and upgrading the tzdata package, I reloaded Waybar, and it now showed the time as 5 hours ahead.

Adding the timezone to the clock configuration for Waybar doesn't seem to have any effect, as others have also mentioned.

For reference, here is the output of timedatectl:

Local time: Mon 2024-09-09 19:19:54 CDT Universal time: Tue 2024-09-10 00:19:54 UTC RTC time: Tue 2024-09-10 00:19:54 Time zone: America/Chicago (CDT, -0500) System clock synchronized: yes NTP service: active RTC in local TZ: no

I haven't noticed any other applications displaying the incorrect time.

zachkarr avatar Sep 10 '24 00:09 zachkarr

The release from IANA that seems to be causing issue is 2024b: Release 2024b - 2024-09-04 12:27:47 -0700. Nothing peculiar in the commit by @andyrtr here.

choucavalier avatar Sep 10 '24 06:09 choucavalier

same problem here.

EssenSea avatar Sep 10 '24 11:09 EssenSea

I am also facing the same issue, would be great if there was a patch :)

nduartech avatar Sep 10 '24 12:09 nduartech

Gentoo rolled back (masked) sys-libs/timezone-data-2024b: https://packages.gentoo.org/packages/sys-libs/timezone-data

I don't think it's a problem that Waybar has to solve, but that the distro maintainers should either rollback tzdata to 2024a or integrate a patch when GCC and LLVM will fix the problem in their lib std c++.

aruhier avatar Sep 10 '24 12:09 aruhier

for now the only thing to do is to download the 2024a-2 from pacman archive and sudo pacman -U tzdata-2024a-2-x86_64.pkg.tar.zst also add it to ignorepkgs in pacman.conf

ghost avatar Sep 10 '24 12:09 ghost

cd /tmp
wget 'https://archive.archlinux.org/packages/t/tzdata/tzdata-2024a-2-x86_64.pkg.tar.zst'
sudo pacman -U tzdata-2024a-2-x86_64.pkg.tar.zst
pkill -f waybar
nohup waybar &

copy paste this in a terminal and you're good to go!

choucavalier avatar Sep 10 '24 14:09 choucavalier

New GCC packages with a fix for this have been built and are now in core-staging before they're released as GA.

If you downgrade tzdata and don't pin the downgrade, pacman will upgrade it again. Also, someone noted segfaults after downgrading tzdata. I'm choosing to run the updated GCC for now, as that will be automatically upgraded when appropriate.

sudo pacman -U https://mirror.pkgbuild.com/core-staging/os/x86_64/gcc-14.2.1+r134+gab884fffe3fc-1-x86_64.pkg.tar.zst https://mirror.pkgbuild.com/core-staging/os/x86_64/gcc-libs-14.2.1+r134+gab884fffe3fc-1-x86_64.pkg.tar.zst

Edited, thanks @alba4k

jbiel avatar Sep 10 '24 17:09 jbiel

@jbiel just a heads up, this will also work, as pacman can download there packages for you

sudo pacman -U https://mirror.pkgbuild.com/core-staging/os/x86_64/gcc-14.2.1+r134+gab884fffe3fc-1-x86_64.pkg.tar.zst https://mirror.pkgbuild.com/core-staging/os/x86_64/gcc-libs-14.2.1+r134+gab884fffe3fc-1-x86_64.pkg.tar.zst

alba4k avatar Sep 10 '24 17:09 alba4k

back to normal after yay -Syu.

aloispichler avatar Sep 10 '24 21:09 aloispichler

Thanks for the suggested fix. Worked like a charm

SketchyStunts avatar Sep 10 '24 23:09 SketchyStunts

10 pm. Wife goes to bed early. I write an email and do some internet stuff. I go to bed. Look at the phone. Suddenly it's past midnight! "There is a bug with the time display!" I exclaim.

My wife responds, "There is a bug with your head, that's what it is."

I believe her.

haansn08 avatar Sep 11 '24 00:09 haansn08

It seems that the latest Arch Linux update (maybe gcc-libs 14.2.1+r134+gab884fffe3fc-1?) fixed this issue.

I no longer have this problem.

asahi-myzk avatar Sep 11 '24 04:09 asahi-myzk

I can cofirm that the issue is gone on Arch. I guess one of these updates fixed it:

  • upgraded tzdata (2024b-1 -> 2024b-2)
  • upgraded gcc-libs (14.2.1+r32+geccf707e5ce-1 -> 14.2.1+r134+gab884fffe3fc-1)

rudolflovrencic avatar Sep 11 '24 07:09 rudolflovrencic

Same here, I updated Arch and now I don't get the weird [warning] Timezone: Europe/Paris. std::chrono::tzdb: cannot locate zone: Europe/Paris error anymore and my clock shows the correct time \o/

Phantomwise avatar Sep 12 '24 20:09 Phantomwise

@rik-x2907 This has been solved by using the latest tzdata package, can you please close this issue?

There's a lot of threads about the clock module having issues with timezones, it's very hard to understand.

itaranto avatar Sep 14 '24 13:09 itaranto

I can confirm that the latest waybar and tzdata packages on Arch Linux work. However, I am still experiencing this issue with waybar installed from nixpkgs-unstable using home-manager on Arch Linux.

jennydaman avatar Sep 30 '24 03:09 jennydaman

downgrading a package is not a fix, it is a workaround

eoli3n avatar Jan 19 '25 16:01 eoli3n