SYNOPSIS

#include <bson.h>

int64_t
bson_iter_date_time (const bson_iter_t *iter);

time_t
bson_iter_time_t (const bson_iter_t *iter);

void
bson_iter_timeval (const bson_iter_t *iter,
                   struct timeval    *tv);

DESCRIPTION

The bson_iter_date_time() function shall return the number of microseconds since the UNIX epoch, as contained in the BSON_TYPE_DATE_TIME element.

The bson_iter_time_t() function shall return the number of seconds since the UNIX epoch, as contained in the BSON_TYPE_DATE_TIME element.

The bson_iter_timeval() function shall return the number of seconds and microseconds since the UNIX epoch, as contained in the BSON_TYPE_DATE_TIME element into tv.

RETURN VALUE

The date and time contained in the element as the number of microseconds since the UNIX epoch.

ERRORS

No errors are defined.

SEE ALSO

AUTHORS

This page was written by MongoDB, Inc.