From c940b70c65b1550fe65dbad5841adfe906cf0cdf Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sat, 14 Mar 2015 21:31:42 -0500 Subject: use the new DateTime::start_of_day() and DateTime::start_of_minute() functions. --- src/actions-live.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/actions-live.cpp') 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()); } -- cgit v1.2.3