aboutsummaryrefslogtreecommitdiffstats
path: root/src/db.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/db.rs')
-rw-r--r--src/db.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/db.rs b/src/db.rs
index 4297d25..4c562ef 100644
--- a/src/db.rs
+++ b/src/db.rs
@@ -36,11 +36,10 @@ impl Connection {
&self,
room_id: i32,
film_id: i32,
- date: chrono::NaiveDate,
- start_time: chrono::NaiveTime,
- end_time: chrono::NaiveTime) -> QueryResult<usize>
+ start_time: chrono::DateTime<chrono::Utc>,
+ end_time: chrono::DateTime<chrono::Utc>) -> QueryResult<usize>
{
- let s = models::NewScreening { room_id, film_id, date, start_time, end_time };
+ let s = models::NewScreening { room_id, film_id, start_time, end_time };
diesel::insert_into(screenings::table)
.values(&s)
.execute(&**self)
@@ -50,11 +49,10 @@ impl Connection {
&self,
room: &models::Room,
film: &models::Film,
- date: chrono::NaiveDate,
- start_time: chrono::NaiveTime,
- end_time: chrono::NaiveTime) -> QueryResult<usize>
+ start_time: chrono::DateTime<chrono::Utc>,
+ end_time: chrono::DateTime<chrono::Utc>) -> QueryResult<usize>
{
- self.create_screening(room.id, film.id, date, start_time, end_time)
+ self.create_screening(room.id, film.id, start_time, end_time)
}
pub fn get_screenings(&self) -> QueryResult<Vec<models::Screening>> {