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

The clock in the waybar has gone wrong #3655

Closed
Dmitryi opened this issue Sep 29, 2024 · 18 comments
Closed

The clock in the waybar has gone wrong #3655

Dmitryi opened this issue Sep 29, 2024 · 18 comments

Comments

@Dmitryi
Copy link

Dmitryi commented Sep 29, 2024

The clock in the waybar has gone off by three hours and is now behind the time in my time zone. In tmux, the time shows exactly how it should be. If you switch to KDE, the time also shows how it should be. The clock went wrong only in the way bar.
config clock in waybar

"clock": {
        "timezone": "Europe/Moscow",
        "interval": 1,
        "format": " {:%a %H:%M %d.%m.%Y}",
        "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
        "format-alt": "{:%Y-%m-%d}"
    }
@bobblkabb
Copy link

The same here, on all 3 computers.
"timezone": "Europe/Berlin"

@steevelefort
Copy link

steevelefort commented Oct 1, 2024

Hello,
Same thing here. The clock widget seems to ignore the timezone ("Europe/Paris" for me).
The 'date' command print the right time on my terminal.
image

@rousty88
Copy link

rousty88 commented Oct 8, 2024

Yes I have the same issue. Waybar just showing/defaulting to UTC time instead of CEST. In my config I have timezone set to Europe/Berlin but it does nothing.

When I run timedatectl in terminal it shows the correct local time. Just a Waybar specific issue.

@Sim23F
Copy link

Sim23F commented Oct 10, 2024

I have the same issue

when running timedatectl:

$ timedatectl 
               Local time: Thu 2024-10-10 12:45:17 CEST
           Universal time: Thu 2024-10-10 10:45:17 UTC
                 RTC time: Thu 2024-10-10 10:45:17
                Time zone: Europe/Rome (CEST, +0200)
System clock synchronized: no
              NTP service: inactive
          RTC in local TZ: no

when running waybar from the terminal, i get this warning:
[2024-10-10 12:46:26.984] [warning] Timezone: Europe/Rome. std::chrono::tzdb: cannot locate zone: Europe/Rome

when running this c++ program to list timezones i get this output:

All available time zones:
Etc/GMT
Etc/UTC

All time zone links:
Etc/GMT+0
Etc/GMT-0
Etc/GMT0
Etc/Greenwich
Etc/UCT
Etc/Universal
Etc/Zulu
GMT
GMT+0
GMT-0
GMT0
Greenwich
UCT
UTC
Universal
Zulu

My time zone:
Etc/UTC

the problem seems to be related to the chrono library which is having trouble identifying most timezones

@WhyNotHugo
Copy link
Contributor

Also seeing this on Alpine Linux, since about 2 weeks ago. Adding an explicit timezone to the config fixes things for me:

"timezone": "America/Argentina/Buenos_Aires",

The annoyance is having to keep this in sync with the system timezone manually.

@pitchispleb
Copy link

"timezone": "Europe/Berlin",
does nothing for me. i replaced it with the posted line from @WhyNotHugo but still nothing changes. time is still shown as UTC, although system is on CEST

Information for package waybar:
-------------------------------
Repository     : Main Repository (OSS)
Name           : waybar
Version        : 0.11.0-2.1
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 1.9 MiB
Installed      : Yes (automatically)
Status         : up-to-date
Source package : waybar-0.11.0-2.1.src
Upstream URL   : https://github.com/Alexays/Waybar

@WhyNotHugo
Copy link
Contributor

There seem to be two different causes for this issue, and my suggestion only works in one of those situations.

@Sim23F
Copy link

Sim23F commented Oct 11, 2024

Since many of us are in European timezones, could it be that we're all using the same distro, openSUSE?
That would suggest an issue with the opensuse packages

@Dmitryi
Copy link
Author

Dmitryi commented Oct 11, 2024

Since many of us are in European timezones, could it be that we're all using the same distro, openSUSE? That would suggest an issue with the opensuse packages

OpenSUSE Tumbleweed

@rousty88
Copy link

Since many of us are in European timezones, could it be that we're all using the same distro, openSUSE? That would suggest an issue with the opensuse packages

OpenSUSE Tumbleweed.

@Sim23F
Copy link

Sim23F commented Oct 11, 2024

I tested that both the waybar's clock and the chrono library works as intended in a snapshot where libstdc++ and timezone were one version behind.
Unfortunately those version are no longer in the repos

Edit: the problem is timezone.
I copied the folder /usr/share/zoneinfo/ from the snapshot to my current system and that solved the issue

@WhyNotHugo
Copy link
Contributor

WhyNotHugo commented Oct 11, 2024 via email

@Sim23F
Copy link

Sim23F commented Oct 11, 2024

It seems that the newly released update to the C++ library has solved the issue.

@rousty88
Copy link

Yes, the issue is fixed for me after running a system update this morning.

@Dmitryi
Copy link
Author

Dmitryi commented Oct 12, 2024

After today's update, the clock began to show an adequate time.

@Dmitryi Dmitryi closed this as completed Oct 12, 2024
@WhyNotHugo
Copy link
Contributor

What do you mean by "today's update"? There hasn't been a release in 30 days, and no commits in master in the last two weeks.

@WhyNotHugo
Copy link
Contributor

If a distro a patching this issue, can you link to the patch, or leave the issue open until this is fixed upstream?

@Sim23F
Copy link

Sim23F commented Oct 12, 2024

You on Alpine seems to have a different issue than the one we were having on Opensuse Tumbleweed.
Our issue was not caused by the waybar package but rather by the incompatibility between the previous version of the c++ std library and the latest version of timezone (wich may have a different name on Alpine)

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

No branches or pull requests

7 participants