diff options
author | Melody Horn <melody@boringcactus.com> | 2021-06-29 22:13:45 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-06-29 22:13:45 -0600 |
commit | 9dd7f2256a82f95096d928aaef70d15603152ebc (patch) | |
tree | 0bca7dcfafcf3a400f0368085c68d572d373a5be /examples/tutorial02 | |
parent | 42d14c943eb31753489b39ef58803c543c023bee (diff) | |
download | tosin-9dd7f2256a82f95096d928aaef70d15603152ebc.tar.gz tosin-9dd7f2256a82f95096d928aaef70d15603152ebc.zip |
correctly gather current time
Diffstat (limited to 'examples/tutorial02')
-rw-r--r-- | examples/tutorial02/main.rs | 5 |
1 files changed, 4 insertions, 1 deletions
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! |