set time 1:00 to all-day google events to avoid issues

This commit is contained in:
tibbi 2017-02-05 21:12:10 +01:00
parent 5bfd2cc0b9
commit e04862e4fb
1 changed files with 4 additions and 2 deletions

View File

@ -93,11 +93,13 @@ class FetchGoogleEventsTask(val activity: Activity, credential: GoogleAccountCre
val reminder = getReminder(googleEvent.reminders) val reminder = getReminder(googleEvent.reminders)
val recurrence = getRecurrence(googleEvent.recurrence) val recurrence = getRecurrence(googleEvent.recurrence)
val start = googleEvent.start val start = googleEvent.start
val end = googleEvent.end
if (start.date != null) { if (start.date != null) {
val startTS = DateTime(start.date).seconds() val startTS = DateTime(start.date).withHourOfDay(1).seconds()
val endTS = DateTime(end.date).withHourOfDay(1).seconds()
} else { } else {
val startTS = DateTime(start.dateTime).seconds() val startTS = DateTime(start.dateTime).seconds()
val endTS = DateTime(googleEvent.end.dateTime).seconds() val endTS = DateTime(end.dateTime).seconds()
} }
} }
return events return events