summaryrefslogtreecommitdiff
path: root/ext/intl/common
diff options
context:
space:
mode:
authorDerick Rethans <github@derickrethans.nl>2017-08-15 15:07:24 +0100
committerDerick Rethans <github@derickrethans.nl>2017-08-15 15:07:24 +0100
commita063d55395c818c401b7efdf6b42b4728ce3df08 (patch)
tree416f56ca182814aad18b4e5b9517014876559882 /ext/intl/common
parentb096eacdd1a00d2b8a1511539dbe77851bf25150 (diff)
parent584db6f38fcac3e5e1ca4c770d3aacfff09ee371 (diff)
downloadphp-git-a063d55395c818c401b7efdf6b42b4728ce3df08.tar.gz
Merge branch 'PHP-7.1' into PHP-7.2
Diffstat (limited to 'ext/intl/common')
-rw-r--r--ext/intl/common/common_date.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/intl/common/common_date.cpp b/ext/intl/common/common_date.cpp
index 7c589bbec2..bd2baee776 100644
--- a/ext/intl/common/common_date.cpp
+++ b/ext/intl/common/common_date.cpp
@@ -50,8 +50,8 @@ U_CFUNC TimeZone *timezone_convert_datetimezone(int type,
break;
case TIMELIB_ZONETYPE_OFFSET: {
int offset_mins = is_datetime
- ? -((php_date_obj*)object)->time->z
- : -(int)((php_timezone_obj*)object)->tzi.utc_offset,
+ ? ((php_date_obj*)object)->time->z / 60
+ : (int)((php_timezone_obj*)object)->tzi.utc_offset / 60,
hours = offset_mins / 60,
minutes = offset_mins - hours * 60;
minutes *= minutes > 0 ? 1 : -1;
@@ -134,7 +134,7 @@ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz,
}
datetime = Z_PHPDATE_P(z);
- *millis = U_MILLIS_PER_SECOND * ((double)Z_LVAL(retval) + datetime->time->f);
+ *millis = U_MILLIS_PER_SECOND * (double)Z_LVAL(retval) + (datetime->time->us / 1000);
zval_ptr_dtor(&zfuncname);
}