Skip to content

Add support for time zones when calculating alarm trigger times#348

Open
cketti wants to merge 12 commits intomainfrom
224-alarm-trigger-calculation
Open

Add support for time zones when calculating alarm trigger times#348
cketti wants to merge 12 commits intomainfrom
224-alarm-trigger-calculation

Conversation

@cketti
Copy link
Copy Markdown
Contributor

@cketti cketti commented May 8, 2026

Unfortunately, this is a rather large pull request. However, the bulk of it is just moving things around, (hopefully) without changing the behavior. These commits are prefixed with [Refactor].

The functional changes are:

  • Extracted the code to calculate the end date using start + duration to Task.end (for calendar events VEvent.getEndDate() was already doing all the work).
  • Changed AlarmTriggerCalculator.alarmTriggerToMinutes() (previously ICalendar.vAlarmToMin()) to support time zones when calculating alarm trigger times
  • A start time (or end time if the alarm is relative to the end) is now required to return the "alarm minutes". This simplifies the code, but required some changes to tests. (It's also in line with what RFC5545 requires.)

@cketti cketti linked an issue May 8, 2026 that may be closed by this pull request
@cketti cketti marked this pull request as ready for review May 8, 2026 17:59
@cketti cketti requested a review from rfc2822 May 8, 2026 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ical4j 4.x] Start handling trigger period + test

1 participant