aboutsummaryrefslogtreecommitdiff
path: root/src/actions-live.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-live.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-live.cpp')
-rw-r--r--src/actions-live.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/actions-live.cpp b/src/actions-live.cpp
index 7efc2b2..121744a 100644
--- a/src/actions-live.cpp
+++ b/src/actions-live.cpp
@@ -119,8 +119,7 @@ void LiveActions::desktop_open_appointment(const Appointment& appt)
void LiveActions::desktop_open_calendar_app(const DateTime& dt)
{
- const auto day_begins = dt.add_full(0, 0, 0, -dt.hour(), -dt.minute(), -dt.seconds());
- const auto gmt = day_begins.to_timezone("UTC");
+ const auto gmt = dt.start_of_day().to_timezone("UTC");
auto cmd = gmt.format("evolution \"calendar:///?startdate=%Y%m%dT%H%M%SZ\"");
execute_command(cmd.c_str());
}