valeriansaliou / vigil

🚦 Microservices Status Page. Monitors a distributed infrastructure and sends alerts (Slack, SMS, etc.).
https://crates.io/crates/vigil-server
Mozilla Public License 2.0
1.73k stars 128 forks source link

Timezone support #51

Open L1Cafe opened 4 years ago

L1Cafe commented 4 years ago

While I do try to stick to UTC as a timezone, I think Vigil would do a better job if it had the possibility of changing timezones.

As this isn't in the documentation, I assumed there's no possibility to change timezones.

A few ideas here:

martin-micimo commented 2 weeks ago

I am not a rust programmer, but I think this could be achieved by replacing time::OffsetDateTime::now_utc() with time::OffsetDateTime::now_local() in:

https://github.com/valeriansaliou/vigil/blob/master/src/aggregator/manager.rs#L336

Do not know how to change the Format in https://github.com/valeriansaliou/vigil/blob/master/src/aggregator/manager.rs#L54 properly, so it displays ok.

And I do not know what kind of side effects this would have in the checking.

But I would like to have that enhancement too.

Can confirm, that it still shows UTC in the Status page if you set the TZ environment to a different timezone on the server.