[evolution-activesync] _eas2ical_convert_datetime_property: add warning if all day event sanity check fails. I.e. if all da
- From: Patrick Ohly <pohly src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-activesync] _eas2ical_convert_datetime_property: add warning if all day event sanity check fails. I.e. if all da
- Date: Mon, 9 Feb 2015 13:51:47 +0000 (UTC)
commit 46ad5407a54fc59b93ae1ea8ef6f98069c0fe19d
Author: Graham R. Cobb <g+syncevolution cobb uk net>
Date: Tue Oct 28 22:51:48 2014 +0000
_eas2ical_convert_datetime_property: add warning if all day event sanity check fails. I.e. if all day
event start/finish is not at midnight.
eas-daemon/libeas/eas-cal-info-translator.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/eas-daemon/libeas/eas-cal-info-translator.c b/eas-daemon/libeas/eas-cal-info-translator.c
index 85e1041..b69ca1c 100644
--- a/eas-daemon/libeas/eas-cal-info-translator.c
+++ b/eas-daemon/libeas/eas-cal-info-translator.c
@@ -470,9 +470,16 @@ static gboolean _eas2ical_convert_datetime_property(icalproperty *prop,
// on 123together.com, but only for events created via ActiveSync,
// not for events created via OWA. If the check fails, then don't
// do the conversion to local time.
- if (!isAllDayEvent ||
- (!localtt.hour && !localtt.minute && !localtt.second))
- tt = localtt;
+ if (isAllDayEvent) {
+ if (localtt.hour || localtt.minute || localtt.second)
+ g_warning("All day event does not start/finish at local midnight: %s.
Reverting to EAS specified time: %s",
+ icaltime_as_ical_string(localtt),
+ icaltime_as_ical_string(tt));
+ else tt=localtt;
+ } else tt=localtt;
+ } else {
+ if (tt.hour || tt.minute || tt.second)
+ g_warning("All day event with no timezone does not start at UTC midnight:
%s", icaltime_as_ical_string_r(tt));
}
if (isAllDayEvent)
tt.is_date = 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]