Skip to content

Commit 08902ba

Browse files
asp24jmikola
authored andcommitted
PHPC-631: Fix timelib_time.f assignment in UTCDateTime::toDateTime()
1 parent 86daabf commit 08902ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

php_phongo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2085,7 +2085,7 @@ void php_phongo_new_datetime_from_utcdatetime(zval *object, int64_t milliseconds
20852085
datetime_obj = Z_PHPDATE_P(object);
20862086
php_date_initialize(datetime_obj, sec, sec_len, NULL, NULL, 0 TSRMLS_CC);
20872087
efree(sec);
2088-
datetime_obj->time->f = milliseconds % 1000;
2088+
datetime_obj->time->f = (double) (milliseconds % 1000) / 1000;
20892089
} /* }}} */
20902090
void php_phongo_new_timestamp_from_increment_and_timestamp(zval *object, uint32_t increment, uint32_t timestamp TSRMLS_DC) /* {{{ */
20912091
{

0 commit comments

Comments
 (0)