From 1a8682568834580b44c448f2e682c704eea626d4 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Fri, 29 Jan 2016 15:28:11 +0100 Subject: [PATCH] Use the new timelib function for comparing times --- ext/date/php_date.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 4ef954717d..d5d06f6b27 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2196,19 +2196,7 @@ static int date_object_compare_date(zval *d1, zval *d2 TSRMLS_DC) timelib_update_ts(o2->time, o2->time->tz_info); } - if (o1->time->sse == o2->time->sse) { - if (o1->time->f == o2->time->f) { - return 0; - } - - if (o1->time->sse < 0) { - return (o1->time->f < o2->time->f) ? 1 : -1; - } else { - return (o1->time->f < o2->time->f) ? -1 : 1; - } - } - - return (o1->time->sse < o2->time->sse) ? -1 : 1; + return timelib_time_compare(o1->time, o2->time); } static HashTable *date_object_get_gc(zval *object, zval ***table, int *n TSRMLS_DC) -- 2.40.0