File tree Expand file tree Collapse file tree
intercode_conventions/src/partial_objects
intercode_entities/src/model_ext Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ use intercode_graphql_core::{
1010 ModelBackedType ,
1111} ;
1212use intercode_graphql_loaders:: LoaderManager ;
13+ use sea_orm:: prelude:: DateTimeUtc ;
1314
1415use 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" ) ]
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments