I would like to display multiple timezones at once in my i3status bar.
E.g. with i3status I had:
tztime DE {
format = "Germany: %H:%M"
timezone = "Europe/Berlin"
}
tztime LA {
format = "LA: %H:%M"
timezone = "US/Pacific"
}
@dakra would that mean that you get both times displayed? (2 separate time blocks)
like: Germany: 11:32 < LA: 02:32 with < being the separator?
or is it having it automatically check current timezone and use that to display something different? (single time block)
Yes. Basically I just want an additional timzone config option so
I can define multiple "time" blocks.
Maybe later it would even be nice to toogle multiple timezones
with a click (or scrollwheel) but I would already be happy with
multiple "time" blocks.
Yea that isn't hard to implement, as long as we use specifiers like UTC+-XX:XX instead of Europe/Berlin.
It would even be possible to use timezone names with the chrono-tz crate
https://github.com/chronotope/chrono-tz
date_with_tz = date.with_timezone(chrono_tz::Tz::from_str(timezone))
Being able to specify UTC+XX:XX would be okish but then you would need to change your config every time daylight saving time changes. So chrono-tz with timezone names would be highly preferred.
I guess this hasn't been implemented yet?
IIRC, there are some issues with timezone support in chrono, which might be related. See #169. I'd be happy to see this added, but don't have the bandwidth to do it myself.
This is implemented in #234
Most helpful comment
This is implemented in #234