greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust
GNU General Public License v3.0
2.82k stars 472 forks source link

Timezone name specifier not working #1965

Closed aplund closed 1 month ago

aplund commented 8 months ago

I have the time block format set to

format = "$timestamp.datetime(f:'%F %a %R %Z')"

The output appears as

2023-11-02 Thu 09:36 +10:00

but the chrono docs say that %Z should be a local timezone name. Their example gives "ACST". Mine is

$ date +'%Z'
AEST

Can't figure out exactly why. But the chrono docs do say Formatting only, which I thought is what this is.

$ i3status-rs -V
i3status-rs 0.32.2
MaxVerevkin commented 8 months ago

See https://docs.rs/chrono/0.4.31/chrono/format/strftime/index.html#fn6

MaxVerevkin commented 8 months ago

However we may implement is ourselves: https://github.com/chronotope/chrono/issues/960#issuecomment-1429547075

bim9262 commented 3 months ago

If we do implement this on our own, it should be opt-in. Personally I find it helpful to know my offset (which changes because of DST) when reviewing logs in UTC, and don't care what the name of the timezone is.