1 use chrono::{DateTime, FixedOffset, NaiveDateTime};
3 pub fn naive_from_unix(time: i64) -> NaiveDateTime {
4 NaiveDateTime::from_timestamp_opt(time, 0).expect("convert datetime")
7 pub fn convert_datetime(datetime: NaiveDateTime) -> DateTime<FixedOffset> {
8 DateTime::<FixedOffset>::from_utc(
10 FixedOffset::east_opt(0).expect("create fixed offset"),