summaryrefslogtreecommitdiff
path: root/ext/intl/common/common_date.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2017-04-09 12:56:41 +0200
committerNikita Popov <nikita.ppv@gmail.com>2017-04-09 12:56:41 +0200
commit4ee6b52d0f4483c6e063b2dd3bb7af1c8a94300d (patch)
tree27039a0d6f0192fea4de696d27a28281eb7544b9 /ext/intl/common/common_date.cpp
parentebdbebee298a86ddddf922e2e817f101fdea4edb (diff)
parent1ce355abb648dc6814ddd00876085617a946396f (diff)
downloadphp-git-4ee6b52d0f4483c6e063b2dd3bb7af1c8a94300d.tar.gz
Merge branch 'PHP-7.1'
Diffstat (limited to 'ext/intl/common/common_date.cpp')
-rw-r--r--ext/intl/common/common_date.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/intl/common/common_date.cpp b/ext/intl/common/common_date.cpp
index 51141c17c7..7c589bbec2 100644
--- a/ext/intl/common/common_date.cpp
+++ b/ext/intl/common/common_date.cpp
@@ -119,6 +119,8 @@ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
}
if (millis) {
+ php_date_obj *datetime;
+
ZVAL_STRING(&zfuncname, "getTimestamp");
if (call_user_function(NULL, z, &zfuncname, &retval, 0, NULL)
!= SUCCESS || Z_TYPE(retval) != IS_LONG) {
@@ -131,7 +133,8 @@ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
return FAILURE;
}
- *millis = U_MILLIS_PER_SECOND * (double)Z_LVAL(retval);
+ datetime = Z_PHPDATE_P(z);
+ *millis = U_MILLIS_PER_SECOND * ((double)Z_LVAL(retval) + datetime->time->f);
zval_ptr_dtor(&zfuncname);
}