summaryrefslogtreecommitdiff
path: root/src/io.c
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2011-12-16 15:18:32 +0100
committerLukas Fleischer <calcurse@cryptocrack.de>2011-12-16 15:18:32 +0100
commitaf9bdd018a98582edf8c3cb538ebf716a25a9df5 (patch)
treed9eec60288bb622aa89b3e1bfae09c617f21a165 /src/io.c
parenta5486605696f92a749277d49c77bb5b194dc67a5 (diff)
parent9a85b790aab1611a7c9105d08fb6be1500ed82f7 (diff)
downloadcalcurse-af9bdd018a98582edf8c3cb538ebf716a25a9df5.zip
Merge branch 'maint'
Conflicts: src/io.c
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/io.c b/src/io.c
index e42d3cf..62b113e 100644
--- a/src/io.c
+++ b/src/io.c
@@ -615,7 +615,11 @@ ical_export_apoints (FILE *stream)
date_sec2date_fmt (apt->start, ICALDATETIMEFMT, ical_datetime);
fputs ("BEGIN:VEVENT\n", stream);
fprintf (stream, "DTSTART:%s\n", ical_datetime);
- fprintf (stream, "DURATION:PT0H0M%ldS\n", apt->dur);
+ fprintf (stream, "DURATION:P%ldDT%ldH%ldM%ldS\n",
+ apt->dur / DAYINSEC,
+ (apt->dur / HOURINSEC) % DAYINHOURS,
+ (apt->dur / MININSEC) % HOURINMIN,
+ apt->dur % MININSEC);
fprintf (stream, "SUMMARY:%s\n", apt->mesg);
if (apt->state & APOINT_NOTIFY)
ical_export_valarm (stream);