Skip to content

Commit

Permalink
Merge pull request #187 from MORE-Platform/418-export-study-calendar-…
Browse files Browse the repository at this point in the history
…link-does-not-work

#418: Fix event end time in CalendarService
  • Loading branch information
janoliver20 authored Dec 4, 2024
2 parents e49a3bd + 8e6aeb2 commit 85e3e14
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public Optional<String> getICalendarString(Long studyId) {
iCalEvent.addCategories("General");
iCalEvent.setSummary("Study: " + study.title());
iCalEvent.setDateStart(Date.from(study.plannedStartDate().atStartOfDay(TimeZone.getDefault().toZoneId()).toInstant()), false);
iCalEvent.setDateEnd(Date.from(study.endDate().atStartOfDay(TimeZone.getDefault().toZoneId()).toInstant()), false);
iCalEvent.setDateEnd(Date.from(study.endDate().atTime(23, 59).atZone(TimeZone.getDefault().toZoneId()).toInstant()), true);
ical.addEvent(iCalEvent);

final Instant start = shiftStartIfObservationAlreadyEnded(
Expand Down

0 comments on commit 85e3e14

Please sign in to comment.