Open gsstark opened 2 years ago
Same here. Used to work for me, but now it doesn't. Have you managed to find a solution?
Think I got what's the problem. It's been introduced during the refactoring here https://github.com/i3/i3status/commit/7418b5bebbcf40a298c3bd6178ea3917ef065225
In short we should do
format_placeholders(format, &placeholders[0], num);
instead of
format_placeholders(format_time, &placeholders[0], num);
because format_time
variable contains strftime value, and not the actual format string.
I've created a PR to address this https://github.com/i3/i3status/pull/507
The result of the testing:
build $ ninja && ./i3status
[3/3] Linking target i3status.
{"version":1}
[
[{"name":"tztime","instance":"UK","markup":"none","full_text":"%Y-%m-%d %I:%M:%S %P %Z"}]
,[{"name":"tztime","instance":"UK","markup":"none","full_text":"%Y-%m-%d %I:%M:%S %P %Z"}]
build $ ninja && ./i3status
[3/3] Linking target i3status.
{"version":1}
[
[{"name":"tztime","instance":"UK","markup":"none","full_text":"<span color='#00FF00'>2022-11-30 08:14:27 pm GMT</span>"}]
,[{"name":"tztime","instance":"UK","markup":"none","full_text":"<span color='#00FF00'>2022-11-30 08:14:28 pm GMT</span>"}]
Sample config
general {
output_format = "i3bar"
}
order += "tztime UK"
tztime UK {
format = "<span color='#00FF00'>%time</span>"
format_time = "%Y-%m-%d %I:%M:%S %P %Z"
timezone = "Europe/London"
}
I just recently upgraded from 2.13 to 2.14 and I'm finding that my tztime stanzas that use format
%time
and format_time have stopped working whereas the stanza that just usesformat
is still working.Is producing: