aboutsummaryrefslogtreecommitdiff
path: root/src/menu.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/menu.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/menu.cpp')
-rw-r--r--src/menu.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/menu.cpp b/src/menu.cpp
index f11de77..ff894bc 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -152,9 +152,9 @@ protected:
const auto now = m_state->clock->localtime();
const auto calendar_day = m_state->calendar_month->month().get();
if ((profile() == Desktop) && !DateTime::is_same_day(now, calendar_day))
- begin = calendar_day.add_full (0, 0, 0, -calendar_day.hour(), -calendar_day.minute(), -calendar_day.seconds());
+ begin = calendar_day.start_of_day();
else
- begin = now.add_full (0, 0, 0, 0, 0, -now.seconds());
+ begin = now.start_of_minute();
std::vector<Appointment> upcoming;
for(const auto& a : m_state->calendar_upcoming->appointments().get())