aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml2
-rw-r--r--examples/tutorial02/main.rs5
2 files changed, 5 insertions, 2 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 14f00f0..ddb4cdb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -8,7 +8,7 @@ edition = "2018"
[dependencies]
barrel = { version = "0.6.5", features = ["sqlite3"] }
-chrono = "0.4"
+chrono = { version = "0.4", features = ["clock"] }
diesel = { version = "1.4.4", features = ["sqlite", "chrono"] }
hyper = { version = "0.14", features = ["full"] }
# TODO not this
diff --git a/examples/tutorial02/main.rs b/examples/tutorial02/main.rs
index 2abac0c..7c244dd 100644
--- a/examples/tutorial02/main.rs
+++ b/examples/tutorial02/main.rs
@@ -41,7 +41,10 @@ mod test {
assert!(all_questions.is_empty());
// make a new one
- let mut q = Question::new("What's new?".to_string(), time::PrimitiveDateTime::now());
+ let mut q = Question::new(
+ "What's new?".to_string(),
+ chrono::Local::now().naive_local(),
+ );
// save it
q.save_mut();
// it's got an id now!