aboutsummaryrefslogtreecommitdiff
path: root/src/actions.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/actions.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/actions.cpp')
-rw-r--r--src/actions.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/actions.cpp b/src/actions.cpp
index 1b665cc..41c7f11 100644
--- a/src/actions.cpp
+++ b/src/actions.cpp
@@ -143,9 +143,7 @@ void on_calendar_activated(GSimpleAction * /*action*/,
g_return_if_fail(t != 0);
- // the client gave us a date; remove the HMS component from the resulting DateTime
- auto dt = DateTime(t);
- dt = dt.add_full (0, 0, 0, -dt.hour(), -dt.minute(), -dt.seconds());
+ auto dt = DateTime(t).start_of_day();
static_cast<Actions*>(gself)->set_calendar_date(dt);
}