summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2021-03-17 09:57:48 +0100
committerSanto Cariotti <santo@dcariotti.me>2021-03-17 09:57:48 +0100
commit0ed019b99d7603f19afbef8e676b342e3c868e76 (patch)
tree6b3aab5fb47ce0c5b46716bea492c07c6791e797
parentf18450a460da8897aaf1ca95553653497f7e7d70 (diff)
chore: use timestamptz for commit date
-rw-r--r--Cargo.toml2
-rw-r--r--src/commit/models.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 8502fcb..42b2318 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -22,7 +22,7 @@ slog-async = "2.4.0"
dotenv = "0.15.0"
config = "0.10.1"
serde = { version = "1.0.104", features = ["derive"] }
-chrono = { version = "0.4.19", features = ["serde"] }
+chrono = { version = "0.4", features = ["serde"] }
uuid = { version = "0.8.2", features = ["serde", "v4"] }
regex = "1"
md-5 = "0.9.1"
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<String>,
pub text: String,
- pub date: NaiveDateTime,
+ pub date: DateTime<Local>,
pub author_email: String, // Reference to Email
pub author_name: String,
pub committer_email: String, // Reference to Email