Skip to content

Commit

Permalink
#376: Fixed the issue where interventions are shown in a different ti…
Browse files Browse the repository at this point in the history
…me slot in the Study Timeline calendar.

* Later on in the code we use Transformers.toOffsetDateTime function, where the "Europe/Vienna" timezone is hardcoded, but we need to consider this timezone in the cronExpression as well, when we calculate the interventions.
  • Loading branch information
bnitsch authored and benitsch committed Jun 3, 2024
1 parent 92fd368 commit afe95ad
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ private static List<Instant> parseToInterventionSchedulesForScheduledTrigger(Tri
if (CronExpression.isValidExpression(cronString)) {
try {
CronExpression cronExpression = new CronExpression(cronString);
cronExpression.setTimeZone(TimeZone.getTimeZone(ZoneId.of("Europe/Vienna")));
Instant currentDate = cronExpression.getNextValidTimeAfter(Date.from(start)).toInstant();
while (currentDate.isBefore(end)) {
events.add(currentDate);
Expand Down

0 comments on commit afe95ad

Please sign in to comment.