diff options
author | kusano <kusano@users.noreply.github.com> | 2016-02-17 01:00:58 +0900 |
---|---|---|
committer | kusano <kusano@users.noreply.github.com> | 2016-02-17 01:00:58 +0900 |
commit | 07cae46b02795f8364d28ecad6ec45f507e7114b (patch) | |
tree | 47795fa54a8cf014e918d8bfe3056e9b30ec9b0e /ext/date/php_date.c | |
parent | d31e8a9a85efea54db0b647424f6c4485d71db8b (diff) | |
parent | 3244d3c7e936b23ad33892e367500f64468c6140 (diff) | |
download | php-git-07cae46b02795f8364d28ecad6ec45f507e7114b.tar.gz |
Merge branch 'master' into fix-mt_rand
Conflicts:
ext/standard/rand.c
Diffstat (limited to 'ext/date/php_date.c')
-rw-r--r-- | ext/date/php_date.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 828f5e5ef7..2fe78a0e69 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2015 The PHP Group | + | Copyright (c) 1997-2016 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -2142,7 +2142,7 @@ static int date_object_compare_date(zval *d1, zval *d2) /* {{{ */ timelib_update_ts(o2->time, o2->time->tz_info); } - return (o1->time->sse == o2->time->sse) ? 0 : ((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) /* {{{ */ @@ -3054,6 +3054,7 @@ static int php_date_modify(zval *object, char *modify, size_t modify_len) /* {{{ timelib_update_ts(dateobj->time, NULL); timelib_update_from_sse(dateobj->time); dateobj->time->have_relative = 0; + memset(&dateobj->time->relative, 0, sizeof(dateobj->time->relative)); return 1; } /* }}} */ |