i3status-rust icon indicating copy to clipboard operation
i3status-rust copied to clipboard

Timezone name specifier not working

Open aplund opened this issue 1 year ago • 3 comments

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

aplund avatar Nov 01 '23 23:11 aplund

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

MaxVerevkin avatar Nov 11 '23 10:11 MaxVerevkin

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

MaxVerevkin avatar Nov 11 '23 10:11 MaxVerevkin

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.

bim9262 avatar Apr 02 '24 02:04 bim9262