php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #52798
Patch 52798 revision 2010-09-23 06:22 UTC by akabirov at rambler dot ru
Patch date_diff revision 2010-09-08 16:03 UTC by cataphract@php.net

Patch 52798 for Date/time related Bug #52798

Patch version 2010-09-23 06:22 UTC

Return to Bug #52798 | Download this patch
Patch Revisions:

Developer: akabirov@rambler.ru

Index: ext/date/lib/interval.c
===================================================================
--- ext/date/lib/interval.c	(revision 303177)
+++ ext/date/lib/interval.c	(working copy)
@@ -54,7 +54,7 @@
 	rt->h = two->h - one->h + dst_h_corr;
 	rt->i = two->i - one->i + dst_m_corr;
 	rt->s = two->s - one->s;
-	rt->days = abs(floor((one->sse - two->sse - (dst_h_corr * 3600) - (dst_m_corr * 60)) / 86400));
+	rt->days = llabs((one->sse - two->sse - (dst_h_corr * 3600) - (dst_m_corr * 60)) / 86400);
 
 	timelib_do_rel_normalize(rt->invert ? one : two, rt);
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 23:01:29 2024 UTC