aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/com.canonical.indicator.datetime3
-rw-r--r--debian/changelog7
-rw-r--r--src/actions-live.cpp4
-rw-r--r--src/utils.c2
-rw-r--r--tests/test-live-actions.cpp4
5 files changed, 17 insertions, 3 deletions
diff --git a/data/com.canonical.indicator.datetime b/data/com.canonical.indicator.datetime
index 7fa1e34..b9de626 100644
--- a/data/com.canonical.indicator.datetime
+++ b/data/com.canonical.indicator.datetime
@@ -9,6 +9,9 @@ ObjectPath=/com/canonical/indicator/datetime/desktop
[desktop_greeter]
ObjectPath=/com/canonical/indicator/datetime/desktop_greeter
+[desktop_lockscreen]
+ObjectPath=/com/canonical/indicator/datetime/desktop_greeter
+
[phone]
ObjectPath=/com/canonical/indicator/datetime/phone
diff --git a/debian/changelog b/debian/changelog
index a80a56d..f11c579 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+indicator-datetime (13.10.0+14.04.20140311.1-0ubuntu1) trusty; urgency=low
+
+ [ Lars Uebernickel ]
+ * add desktop_lockscreen profile
+
+ -- Ubuntu daily release <ps-jenkins@lists.canonical.com> Tue, 11 Mar 2014 18:16:48 +0000
+
indicator-datetime (13.10.0+14.04.20140227.1-0ubuntu1) trusty; urgency=low
[ Charles Kerr ]
diff --git a/src/actions-live.cpp b/src/actions-live.cpp
index ca9ca9b..c179274 100644
--- a/src/actions-live.cpp
+++ b/src/actions-live.cpp
@@ -91,7 +91,9 @@ void LiveActions::open_phone_clock_app()
void LiveActions::open_planner_at(const DateTime& dt)
{
- auto cmd = dt.format("evolution \"calendar:///?startdate=%Y%m%d\"");
+ const auto day_begins = dt.add_full(0, 0, 0, -dt.hour(), -dt.minute(), -dt.seconds());
+ const auto gmt = day_begins.to_timezone("UTC");
+ auto cmd = gmt.format("evolution \"calendar:///?startdate=%Y%m%dT%H%M%SZ\"");
execute_command(cmd.c_str());
}
diff --git a/src/utils.c b/src/utils.c
index 354e389..c9107ce 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -160,7 +160,7 @@ getDateProximity(GDateTime* now, GDateTime* time)
gint time_year, time_month, time_day;
// did it already happen?
- if (g_date_time_compare (now, time) > 0)
+ if (g_date_time_difference(time, now) < -G_USEC_PER_SEC)
return DATE_PROXIMITY_FAR;
// does it happen today?
diff --git a/tests/test-live-actions.cpp b/tests/test-live-actions.cpp
index ffba4ce..d6ef424 100644
--- a/tests/test-live-actions.cpp
+++ b/tests/test-live-actions.cpp
@@ -284,7 +284,9 @@ TEST_F(LiveActionsFixture, OpenPlannerAt)
{
const auto now = DateTime::NowLocal();
m_actions->open_planner_at(now);
- const std::string expected = now.format("evolution \"calendar:///?startdate=%Y%m%d\"");
+ const auto today_begins = now.add_full(0, 0, 0, -now.hour(), -now.minute(), -now.seconds());
+ const auto gmt = today_begins.to_timezone("UTC");
+ const auto expected = gmt.format("evolution \"calendar:///?startdate=%Y%m%dT%H%M%SZ\"");
EXPECT_EQ(expected, m_live_actions->last_cmd);
}