diff options
| author | Rutger Broekhoff | 2025-03-19 21:32:02 +0100 |
|---|---|---|
| committer | Rutger Broekhoff | 2025-03-19 21:32:02 +0100 |
| commit | fda41b7edb9d8ed31878ca67e22192e70c27cbc6 (patch) | |
| tree | 601fc003c8de4e9d5b8f0c343ad96cbfb8139018 | |
| parent | e908a4672ce3960d9f24eefebb0538d6a5e51cf8 (diff) | |
| download | icalproxy-fda41b7edb9d8ed31878ca67e22192e70c27cbc6.tar.gz icalproxy-fda41b7edb9d8ed31878ca67e22192e70c27cbc6.zip | |
Fixes because I did oopsies :I(SDFOJSDIOF
| -rw-r--r-- | icalproxy.go | 12 |
1 files changed, 6 insertions, 6 deletions
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) { | |||
| 126 | if child.Name == ical.CompEvent { | 126 | if child.Name == ical.CompEvent { |
| 127 | if summary := child.Props.Get(ical.PropSummary); summary != nil && | 127 | if summary := child.Props.Get(ical.PropSummary); summary != nil && |
| 128 | strings.HasSuffix(summary.Value, " - Due") { | 128 | strings.HasSuffix(summary.Value, " - Due") { |
| 129 | |||
| 130 | // Modify the start time of the event | 129 | // Modify the start time of the event |
| 131 | startTime, stErr := c.Props.DateTime(ical.PropDateTimeStart, ams) | 130 | startTime, stErr := child.Props.DateTime(ical.PropDateTimeStart, ams) |
| 132 | endTime, etErr := c.Props.DateTime(ical.PropDateTimeEnd, ams) | 131 | endTime, etErr := child.Props.DateTime(ical.PropDateTimeEnd, ams) |
| 133 | if stErr != nil || etErr != nil || startTime.IsZero() || | 132 | if stErr != nil || etErr != nil || startTime.IsZero() || |
| 134 | endTime.IsZero() || !startTime.Equal(endTime) || | 133 | endTime.IsZero() || !startTime.Equal(endTime) || |
| 135 | startTime.Hour() != 23 || startTime.Minute() != 59 || | 134 | startTime.In(ams).Hour() != 23 || |
| 136 | startTime.Second() != 59 { | 135 | startTime.Minute() != 59 || startTime.Second() != 59 { |
| 137 | continue | 136 | continue |
| 138 | } | 137 | } |
| 138 | |||
| 139 | newStartTime := time.Date(startTime.Year(), startTime.Month(), | 139 | newStartTime := time.Date(startTime.Year(), startTime.Month(), |
| 140 | startTime.Day(), 23, 30, 0, 0, ams) | 140 | startTime.Day(), 23, 30, 0, 0, ams) |
| 141 | child.Props.SetDateTime(ical.PropDateTimeStart, newStartTime) | 141 | child.Props.SetDateTime(ical.PropDateTimeStart, newStartTime) |
| @@ -152,7 +152,7 @@ func skewMidnightDeadlines(ams *time.Location, c *ical.Component) { | |||
| 152 | // event time :) | 152 | // event time :) |
| 153 | continue | 153 | continue |
| 154 | } | 154 | } |
| 155 | curText = "+++ ICALPROXY: DEADLINE MOVED FROM 23:59:59 TO" + | 155 | curText = "+++ ICALPROXY: DEADLINE MOVED FROM 23:59:59 TO " + |
| 156 | "23:30:00 (Europe/Amsterdam) +++\n\n" + curText | 156 | "23:30:00 (Europe/Amsterdam) +++\n\n" + curText |
| 157 | descProp.SetText(curText) | 157 | descProp.SetText(curText) |
| 158 | 158 | ||