Skip to content

Commit d53d793

Browse files
committed
Merge branch 'PHP-7.1' of git.php.net:/php-src into PHP-7.1
* 'PHP-7.1' of git.php.net:/php-src: Do the revert properly, and put back fraction support in 7.1
2 parents 5b02d10 + 7121b8d commit d53d793

19 files changed

+12124
-9570
lines changed

ext/date/lib/interval.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ timelib_rel_time *timelib_diff(timelib_time *one, timelib_time *two)
6565
rt->h = two->h - one->h;
6666
rt->i = two->i - one->i;
6767
rt->s = two->s - one->s;
68+
rt->f = two->f - one->f;
6869
if (one_backup.dst == 0 && two_backup.dst == 1 && two->sse >= one->sse + 86400 - dst_corr) {
6970
rt->h += dst_h_corr;
7071
rt->i += dst_m_corr;
@@ -110,6 +111,7 @@ timelib_time *timelib_add(timelib_time *old_time, timelib_rel_time *interval)
110111
t->relative.h = interval->h * bias;
111112
t->relative.i = interval->i * bias;
112113
t->relative.s = interval->s * bias;
114+
t->relative.f = interval->f * bias;
113115
}
114116
t->have_relative = 1;
115117
t->sse_uptodate = 0;
@@ -145,6 +147,7 @@ timelib_time *timelib_sub(timelib_time *old_time, timelib_rel_time *interval)
145147
t->relative.h = 0 - (interval->h * bias);
146148
t->relative.i = 0 - (interval->i * bias);
147149
t->relative.s = 0 - (interval->s * bias);
150+
t->relative.f = 0 - (interval->f * bias);
148151
t->have_relative = 1;
149152
t->sse_uptodate = 0;
150153

0 commit comments

Comments
 (0)