Skip to content
This repository has been archived by the owner on Nov 11, 2021. It is now read-only.

Commit

Permalink
Merge branch 'duration' into 'master'
Browse files Browse the repository at this point in the history
[kcalcore] Create second-type duration for 0 delay durations, contributes to MER#1796.

See merge request !4
  • Loading branch information
chriadam committed Oct 10, 2017
2 parents 7db97a5 + 9bc073b commit 8f5f4db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kcalcore/icalformat_p.cpp
Expand Up @@ -2510,7 +2510,7 @@ Duration ICalFormatImpl::readICalDuration( icaldurationtype d )
int seconds = d.hours * gSecondsPerHour;
seconds += d.minutes * gSecondsPerMinute;
seconds += d.seconds;
if ( seconds ) {
if ( seconds || !days ) { // Create second-type duration for 0 delay durations.
seconds += days * gSecondsPerDay;
if ( d.is_neg ) {
seconds = -seconds;
Expand Down

0 comments on commit 8f5f4db

Please sign in to comment.