master
Evan Chen 2022-01-20 23:42:06 +08:00
parent aa1383ba5d
commit 56caaf5da8
1 changed files with 2 additions and 1 deletions

View File

@ -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))
}