fix(caldav): make sure duration and due date follow rfc5545
Related discussion: https://community.vikunja.io/t/error-with-davx-synchronization/810
This commit is contained in:
parent
f814dd03eb
commit
aaeffe925e
1 changed files with 4 additions and 5 deletions
|
@ -181,6 +181,10 @@ SUMMARY:` + t.Summary + getCaldavColor(t.Color)
|
||||||
if t.Start.Unix() > 0 {
|
if t.Start.Unix() > 0 {
|
||||||
caldavtodos += `
|
caldavtodos += `
|
||||||
DTSTART:` + makeCalDavTimeFromTimeStamp(t.Start)
|
DTSTART:` + makeCalDavTimeFromTimeStamp(t.Start)
|
||||||
|
if t.Duration != 0 && t.DueDate.Unix() == 0 {
|
||||||
|
caldavtodos += `
|
||||||
|
DURATION:PT` + formatDuration(t.Duration)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if t.End.Unix() > 0 {
|
if t.End.Unix() > 0 {
|
||||||
caldavtodos += `
|
caldavtodos += `
|
||||||
|
@ -217,11 +221,6 @@ DUE:` + makeCalDavTimeFromTimeStamp(t.DueDate)
|
||||||
CREATED:` + makeCalDavTimeFromTimeStamp(t.Created)
|
CREATED:` + makeCalDavTimeFromTimeStamp(t.Created)
|
||||||
}
|
}
|
||||||
|
|
||||||
if t.Duration != 0 {
|
|
||||||
caldavtodos += `
|
|
||||||
DURATION:PT` + formatDuration(t.Duration)
|
|
||||||
}
|
|
||||||
|
|
||||||
if t.Priority != 0 {
|
if t.Priority != 0 {
|
||||||
caldavtodos += `
|
caldavtodos += `
|
||||||
PRIORITY:` + strconv.Itoa(mapPriorityToCaldav(t.Priority))
|
PRIORITY:` + strconv.Itoa(mapPriorityToCaldav(t.Priority))
|
||||||
|
|
Loading…
Reference in a new issue