make days-community use Warsaw TZ by default
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
use chrono::{NaiveDate, Utc};
|
use chrono::{NaiveDate, Utc};
|
||||||
|
use chrono_tz::Europe::Warsaw;
|
||||||
|
|
||||||
pub fn days_of_community_existence() -> i64 {
|
pub fn days_of_community_existence() -> i64 {
|
||||||
let formation = NaiveDate::from_ymd_opt(2020, 6, 7).unwrap();
|
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()
|
today.signed_duration_since(formation).num_days()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user