1BSON_APPEND_DATE_TIME(3) libbson BSON_APPEND_DATE_TIME(3)
2
3
4
6 bson_append_date_time - bson_append_date_time()
7
9 #define BSON_APPEND_DATE_TIME(b, key, val) \
10 bson_append_date_time (b, key, (int) strlen (key), val)
11
12 bool
13 bson_append_date_time (bson_t *bson,
14 const char *key,
15 int key_length,
16 int64_t value);
17
19 • bson: A bson_t.
20
21 • key: An ASCII C string containing the name of the field.
22
23 • key_length: The length of key in bytes, or -1 to determine the length
24 with strlen().
25
26 • value: The date and time as specified in milliseconds since the UNIX
27 epoch.
28
30 The bson_append_date_time() function shall append a new element to a
31 bson document containing a date and time with no timezone information.
32 value is assumed to be in UTC format of milliseconds since the UNIX
33 epoch. value MAY be negative.
34
36 Returns true if the operation was applied successfully. The function
37 will fail if appending value grows bson larger than INT32_MAX.
38
40 MongoDB, Inc
41
43 2017-present, MongoDB, Inc
44
45
46
47
481.20.0 Nov 18, 2021 BSON_APPEND_DATE_TIME(3)