master
Evan Chen 2022-01-08 15:25:06 +08:00
parent 9a8a3441f2
commit a2b38d76fa
1 changed files with 3 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package calendar
import (
"bytes"
"fmt"
"strings"
"text/template"
"time"
@ -60,7 +61,8 @@ func ICS(cal_id string, from time.Time, to time.Time) (string, error) {
if err := tmpl.Execute(buf, cal); err != nil {
return "", err
}
return buf.String(), nil
return strings.ReplaceAll(buf.String(), "\n", "\r\n"), nil
}
func icstime(t time.Time) string {