aboutsummaryrefslogtreecommitdiffstats
path: root/libical/src
diff options
context:
space:
mode:
Diffstat (limited to 'libical/src')
-rw-r--r--libical/src/libical/icalvalue.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libical/src/libical/icalvalue.c b/libical/src/libical/icalvalue.c
index 459bebe830..0010c391f6 100644
--- a/libical/src/libical/icalvalue.c
+++ b/libical/src/libical/icalvalue.c
@@ -608,7 +608,12 @@ char* icalvalue_utcoffset_as_ical_string(icalvalue* value)
m = (data - (h*3600))/ 60;
s = (data - (h*3600) - (m*60));
- sprintf(str,"%c%02d%02d%02d",sign,abs(h),abs(m),abs(s));
+ /* FIXME: We may want to always round to the nearest minute, to avoid
+ interop problems with Outlook (2000). It doesn't like seconds here. */
+ if (s == 0)
+ sprintf(str,"%c%02d%02d",sign,abs(h),abs(m));
+ else
+ sprintf(str,"%c%02d%02d%02d",sign,abs(h),abs(m),abs(s));
return str;
}