Skip to content

Commit b195f12

Browse files
committed
Fixed php_phongo_new_datetime_from_utcdatetime fraction init fix https://jira.mongodb.org/browse/PHPC-631
1 parent 4d593c7 commit b195f12

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
@@ -2029,7 +2029,7 @@ void php_phongo_new_datetime_from_utcdatetime(zval *object, int64_t milliseconds
20292029
datetime_obj = Z_PHPDATE_P(object);
20302030
php_date_initialize(datetime_obj, sec, sec_len, NULL, NULL, 0 TSRMLS_CC);
20312031
efree(sec);
2032-
datetime_obj->time->f = milliseconds % 1000;
2032+
datetime_obj->time->f = (double) (milliseconds % 1000) / 1000;
20332033
} /* }}} */
20342034
void php_phongo_new_timestamp_from_increment_and_timestamp(zval *object, uint32_t increment, uint32_t timestamp TSRMLS_DC) /* {{{ */
20352035
{

0 commit comments

Comments
 (0)