aboutsummaryrefslogtreecommitdiff
path: root/src/planner-upcoming.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/planner-upcoming.cpp')
-rw-r--r--src/planner-upcoming.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/planner-upcoming.cpp b/src/planner-upcoming.cpp
index 4e5af6f..ed45955 100644
--- a/src/planner-upcoming.cpp
+++ b/src/planner-upcoming.cpp
@@ -33,8 +33,8 @@ 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_full(0, 0, -1, 0, 0, 0);
- const auto e = dt.add_full(0, 1, 0, 0, 0, 0);
+ const auto b = dt.add_full(0, 0, -1, -dt.hour(), -dt.minute(), -dt.seconds());
+ 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));
});