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 committed May 31, 2024
1 parent c4e0028 commit cbe2eec
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 cbe2eec

Please sign in to comment.