aboutsummaryrefslogtreecommitdiff
path: root/src/planner-upcoming.cpp
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2015-03-14 21:31:42 -0500
committerCharles Kerr <charles.kerr@canonical.com>2015-03-14 21:31:42 -0500
commitc940b70c65b1550fe65dbad5841adfe906cf0cdf (patch)
tree141b128f526f719b09069e5b06e2ee0c9678bea7 /src/planner-upcoming.cpp
parentdb5b700c7c116c73283019b3fbf823a23639a405 (diff)
downloadayatana-indicator-datetime-c940b70c65b1550fe65dbad5841adfe906cf0cdf.tar.gz
ayatana-indicator-datetime-c940b70c65b1550fe65dbad5841adfe906cf0cdf.tar.bz2
ayatana-indicator-datetime-c940b70c65b1550fe65dbad5841adfe906cf0cdf.zip
use the new DateTime::start_of_day() and DateTime::start_of_minute() functions.
Diffstat (limited to 'src/planner-upcoming.cpp')
-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 ed45955..338329c 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_full(0, 0, -1, -dt.hour(), -dt.minute(), -dt.seconds());
+ const auto b = dt.add_days(-1).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));