Alexays / Waybar

Highly customizable Wayland bar for Sway and Wlroots based compositors. :v: :tada:
MIT License
6.68k stars 709 forks source link

waybar displaying wrong timezone #3024

Open Kommynct opened 8 months ago

Kommynct commented 8 months ago

timedatectl outputs the following:

               Local time: Sun 2024-03-17 20:16:08 EDT
           Universal time: Mon 2024-03-18 00:16:08 UTC
                 RTC time: Mon 2024-03-18 00:16:09

System clock synchronized: yes
              NTP service: active
          RTC in local TZ: no

However, after v0.10.0, waybar is now saying it is currently midnight.

sgse commented 2 months ago

[warning] Timezone: Europe/Berlin. std::chrono::tzdb: cannot locate zone: Europe/Berlin

It is related to tzdata

Loara commented 2 months ago

On Arch Linux if I try to list all the timezones contained in tzdb

#include <chrono>
#include <iostream>

int main() {
    const std::vector<std::chrono::time_zone> &zones = std::chrono::get_tzdb().zones;
    for(const std::chrono::time_zone &i : zones) {
        std::cout << i.name() << std::endl;
    }
}

then I get only the following timezones

Etc/GMT
Etc/UTC

and this is the reason tzdb doesn't recognize any other timezone.

Links:

https://en.cppreference.com/w/cpp/chrono/tzdb

itaranto commented 2 months ago

Guys, I think we could be misleading the devs here, as far as I understand there's two issues:

I think this should be split into two different issues.

enabwds commented 2 months ago

Agreed, the issue should be split into 2

luffyxxsenpai commented 2 months ago

another one confirming downgrading tzdata 2024a-1 or 2024a-2 fix the issue

i literally messed up my hwclock timedatectl bios clock everything lol

image

YiitWT commented 2 months ago

About to kms if clock keeps showing wrong in waybar

KorigamiK commented 2 months ago

About to kms if clock keeps showing wrong in waybar

replace the clock module with something similar int the meantime:

  "custom/clock": {
    "exec": "date +\"%I:%M %p\"",
    "format": " {}",
    "interval": 10
  },
skinnypuppy commented 2 months ago

Just installed vanilla arch, the issue appears to be fixed as my clock in the waybar is correct. Tzdata version is 2024b-2 from core-testing.

Tosainu commented 2 months ago

It looks like the recent tzdata issue has been solved by gcc-14.2.1+r134+gab884fffe3fc-1.

https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/commit/2d0f36bcac02e8ebe25f3c187c51285bd1741737

Kommynct commented 2 months ago

However, the issue in the post is still present, and is unrelated to tzdata, I believe you all are looking for issue https://github.com/Alexays/Waybar/issues/3575

beeender commented 2 months ago

It looks like the recent tzdata issue has been solved by gcc-14.2.1+r134+gab884fffe3fc-1.

https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/commit/2d0f36bcac02e8ebe25f3c187c51285bd1741737

~Re-building waybar with the latest GCC fixes the issue.~

hmmm, actually, upgrading the gcc-libs to the latest version seems to fix the issue. No need to rebuild

~/.config/waybar
❯ ldd /usr/bin/waybar | grep gcc
        libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007d0fcfcf0000)

~/.config/waybar
❯ pacman -Qo /usr/lib/libgcc_s.so.1
/usr/lib/libgcc_s.so.1 is owned by gcc-libs 14.2.1+r134+gab884fffe3fc-1
mprelec commented 2 months ago

Thanks for the update on the issue. Update to latest gcc-libs and gcc fixed it on my arch. Then just do a _pkill waybar && waybar -c /path/to/waybar_config -s /path/to/waybarstyle.css & Cheers

gammons commented 2 months ago

Fix confirmed. Just doing a regular pacman -Syu pulled in the update to gcc-libs and gcc, and once that completed I ran waybar again, and the timezone issue was fixed. :tada:

cold-bin commented 2 months ago

thanks.

itaranto commented 2 months ago

However, the issue in the post is still present, and is unrelated to tzdata, I believe you all are looking for issue #3575

Yes, this issue still happens to me (it's not related with the tzdata issue at all).

itaranto commented 2 months ago

@Kommynct I'd suggest closing this issue and creating a new one, otherwise it will be very confusing for the devs.

Kommynct commented 2 months ago

i suggest people post about their issue in the relevant issue trackers instead of taking over an unrelated one

itaranto commented 2 months ago

i suggest people post about their issue in the relevant issue trackers instead of taking over an unrelated one

Yes, I was about to say your issue got hi-jacked by another one :man_shrugging:

WhyNotHugo commented 1 month ago

This ticket is about an issue that has been around since March.

For a similar issue that appeared about two weeks ago, see https://github.com/Alexays/Waybar/issues/3655