make adding a duration be done in parts, instead of converting to seconds.
bug 303826, r=dmose git-svn-id: svn://10.0.0.236/trunk@179488 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -310,9 +310,11 @@ int icaldurationtype_is_bad_duration(struct icaldurationtype d)
|
||||
struct icaltimetype icaltime_add(struct icaltimetype t,
|
||||
struct icaldurationtype d)
|
||||
{
|
||||
int dt = icaldurationtype_as_int(d);
|
||||
|
||||
t.second += dt;
|
||||
t.second += d.seconds;
|
||||
t.minute += d.minutes;
|
||||
t.hour += d.hours;
|
||||
t.day += d.days;
|
||||
t.day += d.weeks * 7;
|
||||
|
||||
t = icaltime_normalize(t);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user