aboutsummaryrefslogtreecommitdiff
path: root/tests/test-menus.cpp
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2015-03-17 15:23:49 +0000
committerCI Train Bot <ci-train-bot@canonical.com>2015-03-17 15:23:49 +0000
commitddde67df581dea8c5a261e43d5b12a3821f06ed1 (patch)
treee3c2859c54b0bba9c72ad221ea41c95ed8f5a70f /tests/test-menus.cpp
parent15ec7f61fa84a9a8b40c1c9fcfa6c2a268d3232b (diff)
parent273c3b3829c9a3e853d0b6b0a32ae87cc3c6852b (diff)
downloadayatana-indicator-datetime-ddde67df581dea8c5a261e43d5b12a3821f06ed1.tar.gz
ayatana-indicator-datetime-ddde67df581dea8c5a261e43d5b12a3821f06ed1.tar.bz2
ayatana-indicator-datetime-ddde67df581dea8c5a261e43d5b12a3821f06ed1.zip
Fix bug that prevented clicking on calendar days where DST sprang forward. Fixes: #1429388
Approved by: Ted Gould, PS Jenkins bot
Diffstat (limited to 'tests/test-menus.cpp')
-rw-r--r--tests/test-menus.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/test-menus.cpp b/tests/test-menus.cpp
index e0e63ac..fb9c50a 100644
--- a/tests/test-menus.cpp
+++ b/tests/test-menus.cpp
@@ -151,9 +151,7 @@ protected:
// now change the clock and see if the date label changes appropriately
- auto gdt_tomorrow = g_date_time_add_days(now.get(), 1);
- auto tomorrow = DateTime(gdt_tomorrow);
- g_date_time_unref(gdt_tomorrow);
+ auto tomorrow = now.add_days(1).start_of_day();
m_mock_state->mock_clock->set_localtime(tomorrow);
wait_msec();
@@ -182,9 +180,7 @@ private:
std::vector<Appointment> build_some_appointments()
{
const auto now = m_state->clock->localtime();
- auto gdt_tomorrow = g_date_time_add_days(now.get(), 1);
- const auto tomorrow = DateTime(gdt_tomorrow);
- g_date_time_unref(gdt_tomorrow);
+ const auto tomorrow = now.add_days(1);
Appointment a1; // an alarm clock appointment
a1.color = "red";