---
name: "mongoc_client_session_get_cluster_time"
section: "3"
platform: "linux"
package: "libmongoc-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mongoc_client_session_get_cluster_time"
---

# mongoc\_client\_session\_get\_cluster\_time(3)

## SYNOPSIS

```
const bson_t *
mongoc_client_session_get_cluster_time (const mongoc_client_session_t *session);
```

Get the session's clusterTime as a BSON document.

## PARAMETERS

- •

  **session**: A *mongoc\_client\_session\_t*.

## RETURNS

If the session has not been used for any operation and *mongoc\_client\_session\_advance\_cluster\_time()* has not been called, a *bson\_t* that is valid only for the lifetime of **session**. Otherwise, **NULL**.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
