make days-community use Warsaw TZ by default

This commit is contained in:
2025-10-20 00:37:43 +02:00
parent 3b83bc89a0
commit bd689dd736

View File

@@ -1,8 +1,9 @@
use chrono::{NaiveDate, Utc};
use chrono_tz::Europe::Warsaw;
pub fn days_of_community_existence() -> i64 {
let formation = NaiveDate::from_ymd_opt(2020, 6, 7).unwrap();
let today = Utc::now().date_naive();
let today = Utc::now().with_timezone(&Warsaw).date_naive();
today.signed_duration_since(formation).num_days()
}