removed deprecated function

This commit is contained in:
2026-03-03 15:32:35 +01:00
parent d1d7f89dfb
commit a4457dc2d7

View File

@@ -11,23 +11,13 @@ pub struct Alarm {
pub title: String, pub title: String,
} }
impl Alarm {
pub fn new(id: i32, enabled: bool, time: DateTime<Utc>, title: String) -> Self {
Self {
id,
enabled,
time,
title,
}
}
}
impl From<model::alarm::Model> for Alarm { impl From<model::alarm::Model> for Alarm {
fn from(value: model::alarm::Model) -> Self { fn from(value: model::alarm::Model) -> Self {
Self { Self {
id: value.id, id: value.id,
enabled: value.enabled, enabled: value.enabled,
time: DateTime::from_utc(value.time, Utc), time: DateTime::from_naive_utc_and_offset(value.time, Utc),
title: value.title, title: value.title,
} }
} }