am 426ac065: Merge change 22328 into eclair
Merge commit '426ac065d0065507b7bc8c7c5c47fc2b09de2c82' into eclair-plus-aosp * commit '426ac065d0065507b7bc8c7c5c47fc2b09de2c82': Fix recurrence parsing for all-day events.
This commit is contained in:
@@ -410,10 +410,14 @@ public static boolean populateComponent(ContentValues values,
|
|||||||
|
|
||||||
Time end = new Time(endTzid);
|
Time end = new Time(endTzid);
|
||||||
end.parse(dtendProperty.getValue());
|
end.parse(dtendProperty.getValue());
|
||||||
long durationMillis = end.toMillis(false /* use isDst */)
|
long durationMillis = end.toMillis(false /* use isDst */)
|
||||||
- start.toMillis(false /* use isDst */);
|
- start.toMillis(false /* use isDst */);
|
||||||
long durationSeconds = (durationMillis / 1000);
|
long durationSeconds = (durationMillis / 1000);
|
||||||
return "P" + durationSeconds + "S";
|
if (start.allDay && (durationSeconds % 86400) == 0) {
|
||||||
|
return "P" + (durationSeconds / 86400) + "D"; // Server wants this instead of P86400S
|
||||||
|
} else {
|
||||||
|
return "P" + durationSeconds + "S";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String flattenProperties(ICalendar.Component component,
|
private static String flattenProperties(ICalendar.Component component,
|
||||||
|
|||||||
Reference in New Issue
Block a user