Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions php_phongo.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ static void php_phongo_log(mongoc_log_level_t log_level, const char* log_domain,

(void) user_data;

gettimeofday(&tv, NULL);
bson_gettimeofday(&tv);
t = tv.tv_sec;
tu = tv.tv_usec;

Expand Down Expand Up @@ -1326,7 +1326,7 @@ void php_phongo_write_concern_to_zval(zval* retval, const mongoc_write_concern_t
if (wtimeout != 0) {
#if SIZEOF_ZEND_LONG == 4
if (wtimeout > INT32_MAX || wtimeout < INT32_MIN) {
ADD_ASSOC_INT64_AS_STRING(&retval, "wtimeout", wtimeout);
ADD_ASSOC_INT64_AS_STRING(retval, "wtimeout", wtimeout);
} else {
ADD_ASSOC_LONG_EX(retval, "wtimeout", wtimeout);
}
Expand Down
2 changes: 1 addition & 1 deletion src/BSON/UTCDateTime.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static bool php_phongo_utcdatetime_init_from_current_time(php_phongo_utcdatetime
int64_t sec, usec;
struct timeval cur_time;

gettimeofday(&cur_time, NULL);
bson_gettimeofday(&cur_time);
sec = cur_time.tv_sec;
usec = cur_time.tv_usec;

Expand Down