Skip to content

Commit a463bfe

Browse files
committed
Remove deprecated method usages
1 parent dc54a5c commit a463bfe

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

crates/intercode_conventions/src/partial_objects/convention_conventions_fields.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use intercode_graphql_core::{
1010
ModelBackedType,
1111
};
1212
use intercode_graphql_loaders::LoaderManager;
13+
use sea_orm::prelude::DateTimeUtc;
1314

1415
use super::{
1516
user_activity_alert_conventions_fields::UserActivityAlertConventionsFields,
@@ -73,7 +74,7 @@ impl ConventionConventionsFields {
7374
self
7475
.model
7576
.ends_at
76-
.map(|t| DateTime::<Utc>::from_utc(t, Utc))
77+
.map(|t| DateTimeUtc::from_naive_utc_and_offset(t, Utc))
7778
}
7879

7980
#[graphql(name = "event_mailing_list_domain")]
@@ -146,7 +147,7 @@ impl ConventionConventionsFields {
146147
self
147148
.model
148149
.starts_at
149-
.map(|t| DateTime::<Utc>::from_utc(t, Utc))
150+
.map(|t| DateTimeUtc::from_naive_utc_and_offset(t, Utc))
150151
}
151152

152153
#[graphql(name = "ticket_mode")]

crates/intercode_entities/src/model_ext/conventions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl conventions::Model {
3737

3838
pub fn ended(&self) -> bool {
3939
if let Some(ends_at) = self.ends_at {
40-
DateTimeUtc::from_utc(ends_at, Utc) <= Utc::now()
40+
DateTimeUtc::from_naive_utc_and_offset(ends_at, Utc) <= Utc::now()
4141
} else {
4242
false
4343
}

0 commit comments

Comments
 (0)