Description
Checklist
- I have read the appropriate section in the contributing guidelines
- I believe this issue is a problem with polybar itself and not a misconfiguration on my part
- I have searched for other open and closed issues that may have already reported this problem
- I have checked the known issues page for this problem.
- I have followed the debugging guide to narrow down the problem to a minimal config.
Steps to reproduce
- Run polybar
- Open some clock program/website (such as time.is or peaclock)
- Check time in both to compare
It drifts noticeably even despite expecting it to synchronise every minute -- that is, at HH:MM:00
Minimal config
[bar/example]
width = 100%
height = 30
radius = 5
bottom = false
modules-left = date
[module/date]
type = internal/date
interval = 60
format-prefix =
format-prefix-foreground = #FF93bdcc
time = "%H%{F#ccc}:%{F}%M"
time-alt = "%H%{F#ccc}:%{F}%M%{F#ccc}:%{F}%S %Z"
date = " %{F#ccc}%b.%{F} %d%{F#bbb},%{F-} %{F#ccc}%a%{F-}"
date-alt = " %Y %{F#ccc}%b.%{F} %d%{F#bbb},%{F-} %{F#ccc}%a%{F-}"
label = %date% %{F#FFA0A0A0}%{F-} %time%
Polybar log
Expected behavior
With an interval of 60 seconds, I would expect the clocks to be synchronised with the actual time. In other words, it would execute every minute sharp rather than every 60s regardless of starting time.
Actual behavior
The date module and an actual clock show different times. See screenshot.
Window Manager and Version
bspwm 0.9.10
Linux Distribution
Artix Linux (packages up to date)
Polybar version
polybar 3.7.2-27-g9476ad80
Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard
X extensions: +randr (+monitors) +composite +xkb +xrm +xcursor
Build type: Release
Compiler: /usr/bin/g++
Compiler flags: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -flto=auto -O3 -DNDEBUG -Wall -Wextra -Wpedantic -Wdeprecated-copy-dtor -Wsuggest-override
Linker flags: -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto -Wall -Wextra -Wpedantic -Wdeprecated-copy-dtor -Wsuggest-override -Wall -Wextra -Wpedantic -Wdeprecated-copy-dtor -Wsuggest-override
Additional Context / Screenshots
While checking this problem I found the PR #2123, where supposedly this problem ought to be fixed.
I assume the idea behind the fix is to have an interval lower than 60 to sync and then update every minute to be in sync... I am not entirely sure whether it works or there's something wrong with the configuration above.
It's somewhat puzzling.