summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-03-02 14:37:36 +0100
committerMatthias Beyer <mail@beyermatthias.de>2018-03-03 13:31:02 +0100
commitff0822ec04d2be2c8b322bb73c3363d157c76c4e (patch)
tree628834fe0d8d3bc4c2e256db33cb53adde78dc36
parent4aa3288338a0f670ee62c43ae897dadcb62b7bfa (diff)
Fix: Hourly/Minutely should set minute/second to zero
-rw-r--r--bin/domain/imag-diary/src/create.rs3
-rw-r--r--doc/src/09020-changelog.md2
2 files changed, 5 insertions, 0 deletions
diff --git a/bin/domain/imag-diary/src/create.rs b/bin/domain/imag-diary/src/create.rs
index e4e22d5..fb2a3fc 100644
--- a/bin/domain/imag-diary/src/create.rs
+++ b/bin/domain/imag-diary/src/create.rs
@@ -120,6 +120,8 @@ fn create_id_from_clispec(create: &ArgMatches, diaryname: &str, timed_type: Time
Timed::Hourly => {
debug!("Creating hourly-timed entry");
get_hourly_id(create)
+ .with_minute(0)
+ .with_second(0)
},
Timed::Minutely => {
@@ -135,6 +137,7 @@ fn create_id_from_clispec(create: &ArgMatches, diaryname: &str, timed_type: Time
.unwrap_or(time.minute());
time.with_minute(min)
+ .with_second(0)
},
Timed::Secondly => {
diff --git a/doc/src/09020-changelog.md b/doc/src/09020-changelog.md
index e677fd1..77f7a93 100644
--- a/doc/src/09020-changelog.md
+++ b/doc/src/09020-changelog.md
@@ -31,6 +31,8 @@ Bugfix release for fixing:
with a line "---" in the content part to fail, was fixed.
* The bugfix above introduced another bug which caused entries to be rewritten
in one line when accessing them. This was fixed.
+* `imag-diary` did not properly set "minute" and "second" when creating "hourly"
+ or "minutely" entries.
## 0.6.1