diff --git a/calendar/ics.go b/calendar/ics.go index da258c0..4ffe457 100644 --- a/calendar/ics.go +++ b/calendar/ics.go @@ -30,7 +30,7 @@ END:STANDARD END:VTIMEZONE*/}}{{with .Events}}{{ if gt (len .) 0 }}{{ range $event := . }} BEGIN:VEVENT DTSTART:{{$event.Start|icstime}} -DTEND:{{$event.End|icstime}} +DTEND:{{(tadd $event.End 5)|icstime}} DTSTAMP:{{now|icstime}} UID:{{$event.ID}} CREATED:{{$event.CreatedAt|icstime}} @@ -50,6 +50,7 @@ func init() { tmpl = template.Must(template.New("").Funcs(template.FuncMap{ "icstime": icstime, "now": func() time.Time { return time.Now() }, + "tadd": func(t time.Time, min int) time.Time { return t.Add(time.Minute * time.Duration(min)) }, }).Parse(ics_base)) }