From c1666c0ad2a0ad0ca846b1c6b77c2a81c2ce45ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 16 Nov 2016 02:54:56 +0100 Subject: 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 --- src/planner-upcoming.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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& 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(b,e)); -- cgit v1.2.3