From 0ed019b99d7603f19afbef8e676b342e3c868e76 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Wed, 17 Mar 2021 09:57:48 +0100 Subject: chore: use timestamptz for commit date --- src/commit/models.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/commit/models.rs b/src/commit/models.rs index 068c550..6246511 100644 --- a/src/commit/models.rs +++ b/src/commit/models.rs @@ -1,7 +1,7 @@ use crate::db::get_client; use crate::errors::AppError; -use chrono::NaiveDateTime; +use chrono::{DateTime, Local}; use deadpool_postgres::Pool; use serde::{Deserialize, Serialize}; use tokio_pg_mapper::FromTokioPostgresRow; @@ -14,7 +14,7 @@ pub struct Commit { pub hash: String, pub tree: Option, pub text: String, - pub date: NaiveDateTime, + pub date: DateTime, pub author_email: String, // Reference to Email pub author_name: String, pub committer_email: String, // Reference to Email -- cgit v1.2.3-18-g5258