aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarco Trevisan (TreviƱo) <mail@3v1n0.net>2016-11-16 02:54:56 +0100
committerRobert Tari <robert@tari.in>2021-07-09 00:19:38 +0200
commitc1666c0ad2a0ad0ca846b1c6b77c2a81c2ce45ac (patch)
tree46343c7b40742390753e75777059e34afbdb7324 /src
parent46d007f0e15aba176d191d349f8a916ee77d5a72 (diff)
downloadayatana-indicator-datetime-c1666c0ad2a0ad0ca846b1c6b77c2a81c2ce45ac.tar.gz
ayatana-indicator-datetime-c1666c0ad2a0ad0ca846b1c6b77c2a81c2ce45ac.tar.bz2
ayatana-indicator-datetime-c1666c0ad2a0ad0ca846b1c6b77c2a81c2ce45ac.zip
UpcomingPlanner: don't get events from the day before of the selected one
We only need events from the midnight of the selected date to the next month
Diffstat (limited to 'src')
-rw-r--r--src/planner-upcoming.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/planner-upcoming.cpp b/src/planner-upcoming.cpp
index 918ebbe..149ac09 100644
--- a/src/planner-upcoming.cpp
+++ b/src/planner-upcoming.cpp
@@ -33,7 +33,7 @@ UpcomingPlanner::UpcomingPlanner(const std::shared_ptr<RangePlanner>& range_plan
{
date().changed().connect([this](const DateTime& dt){
// set the range to the upcoming month
- const auto b = dt.add_days(-1).start_of_day();
+ const auto b = dt.start_of_day();
const auto e = b.add_full(0, 1, 0, 0, 0, 0);
g_debug("%p setting date range to [%s..%s]", this, b.format("%F %T").c_str(), e.format("%F %T").c_str());
m_range_planner->range().set(std::pair<DateTime,DateTime>(b,e));