aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2016-03-18 22:20:03 -0300
committerRobert Tari <robert@tari.in>2021-07-05 00:44:12 +0200
commitbf7746273c111b004c56a0868bb1702d96ecb67f (patch)
tree40617ffc0b0d59d111adf3b1c0e41c583498e392 /src
parent976cb51840ec2eb1f63649cfdf82d1bc9fa3676b (diff)
downloadayatana-indicator-datetime-bf7746273c111b004c56a0868bb1702d96ecb67f.tar.gz
ayatana-indicator-datetime-bf7746273c111b004c56a0868bb1702d96ecb67f.tar.bz2
ayatana-indicator-datetime-bf7746273c111b004c56a0868bb1702d96ecb67f.zip
Lauch calendar app using the event start time.
Diffstat (limited to 'src')
-rw-r--r--src/actions-live.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/actions-live.cpp b/src/actions-live.cpp
index 6ac1878..4fe2f39 100644
--- a/src/actions-live.cpp
+++ b/src/actions-live.cpp
@@ -162,25 +162,16 @@ void LiveActions::phone_open_appointment(const Appointment& appt)
break;
case Appointment::EVENT:
- if (!appt.source_uid.empty() && !appt.uid.empty())
- {
- std::stringstream cmd;
- // event-id format: <source-id>/<event-id>
- cmd << "calendar://eventid="
- << appt.source_uid
- << "/"
- << appt.uid;
- dispatch_url(cmd.str());
- break;
- }
default:
phone_open_calendar_app(appt.begin);
+ break;
}
}
void LiveActions::phone_open_calendar_app(const DateTime& dt)
{
- auto cmd = dt.format("calendar:///?startdate=%Y%m%dT%H%M%SZ");
+ const auto utc = dt.to_timezone("UTC");
+ auto cmd = utc.format("calendar://startdate=%Y-%m-%dT%H:%M:%S+00:00");
dispatch_url(cmd);
}