From fda41b7edb9d8ed31878ca67e22192e70c27cbc6 Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Wed, 19 Mar 2025 21:32:02 +0100 Subject: Fixes because I did oopsies :I(SDFOJSDIOF --- icalproxy.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'icalproxy.go') diff --git a/icalproxy.go b/icalproxy.go index 152eed6..77ced94 100644 --- a/icalproxy.go +++ b/icalproxy.go @@ -126,16 +126,16 @@ func skewMidnightDeadlines(ams *time.Location, c *ical.Component) { if child.Name == ical.CompEvent { if summary := child.Props.Get(ical.PropSummary); summary != nil && strings.HasSuffix(summary.Value, " - Due") { - // Modify the start time of the event - startTime, stErr := c.Props.DateTime(ical.PropDateTimeStart, ams) - endTime, etErr := c.Props.DateTime(ical.PropDateTimeEnd, ams) + startTime, stErr := child.Props.DateTime(ical.PropDateTimeStart, ams) + endTime, etErr := child.Props.DateTime(ical.PropDateTimeEnd, ams) if stErr != nil || etErr != nil || startTime.IsZero() || endTime.IsZero() || !startTime.Equal(endTime) || - startTime.Hour() != 23 || startTime.Minute() != 59 || - startTime.Second() != 59 { + startTime.In(ams).Hour() != 23 || + startTime.Minute() != 59 || startTime.Second() != 59 { continue } + newStartTime := time.Date(startTime.Year(), startTime.Month(), startTime.Day(), 23, 30, 0, 0, ams) child.Props.SetDateTime(ical.PropDateTimeStart, newStartTime) @@ -152,7 +152,7 @@ func skewMidnightDeadlines(ams *time.Location, c *ical.Component) { // event time :) continue } - curText = "+++ ICALPROXY: DEADLINE MOVED FROM 23:59:59 TO" + + curText = "+++ ICALPROXY: DEADLINE MOVED FROM 23:59:59 TO " + "23:30:00 (Europe/Amsterdam) +++\n\n" + curText descProp.SetText(curText) -- cgit v1.2.3