I3status-rust: Multiple timezones support

Created on 11 Aug 2017  路  8Comments  路  Source: greshake/i3status-rust

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"
}
help wanted

Most helpful comment

This is implemented in #234

All 8 comments

@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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

greshake picture greshake  路  6Comments

YodaEmbedding picture YodaEmbedding  路  4Comments

boi4 picture boi4  路  3Comments

jpeeler picture jpeeler  路  5Comments

svenstaro picture svenstaro  路  4Comments