diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/actions-live.cpp | 4 | ||||
-rw-r--r-- | src/utils.c | 2 |
2 files changed, 4 insertions, 2 deletions
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? |