aboutsummaryrefslogtreecommitdiff
path: root/src/planner-month.cpp
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2015-03-17 15:23:49 +0000
committerCI Train Bot <ci-train-bot@canonical.com>2015-03-17 15:23:49 +0000
commitddde67df581dea8c5a261e43d5b12a3821f06ed1 (patch)
treee3c2859c54b0bba9c72ad221ea41c95ed8f5a70f /src/planner-month.cpp
parent15ec7f61fa84a9a8b40c1c9fcfa6c2a268d3232b (diff)
parent273c3b3829c9a3e853d0b6b0a32ae87cc3c6852b (diff)
downloadayatana-indicator-datetime-ddde67df581dea8c5a261e43d5b12a3821f06ed1.tar.gz
ayatana-indicator-datetime-ddde67df581dea8c5a261e43d5b12a3821f06ed1.tar.bz2
ayatana-indicator-datetime-ddde67df581dea8c5a261e43d5b12a3821f06ed1.zip
Fix bug that prevented clicking on calendar days where DST sprang forward. Fixes: #1429388
Approved by: Ted Gould, PS Jenkins bot
Diffstat (limited to 'src/planner-month.cpp')
-rw-r--r--src/planner-month.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/planner-month.cpp b/src/planner-month.cpp
index 5920daa..cdae26f 100644
--- a/src/planner-month.cpp
+++ b/src/planner-month.cpp
@@ -32,13 +32,8 @@ MonthPlanner::MonthPlanner(const std::shared_ptr<RangePlanner>& range_planner,
m_range_planner(range_planner)
{
month().changed().connect([this](const DateTime& m){
- auto month_begin = m.add_full(0, // no years
- 0, // no months
- -(m.day_of_month()-1),
- -m.hour(),
- -m.minute(),
- -m.seconds());
- auto month_end = month_begin.add_full(0, 1, 0, 0, 0, -0.1);
+ auto month_begin = m.start_of_month();
+ auto month_end = m.end_of_month();
g_debug("PlannerMonth %p setting calendar month range: [%s..%s]", this, month_begin.format("%F %T").c_str(), month_end.format("%F %T").c_str());
m_range_planner->range().set(std::pair<DateTime,DateTime>(month_begin,month_end));
});