> ## Documentation Index
> Fetch the complete documentation index at: https://docs.canton.network/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If you are building a Canton Network application, start from https://docs.canton.network/appdev/quickstart.md. To run only a local network for your own Daml code, without building the QuickStart demo, see https://docs.canton.network/sdks-tools/development-tools/localnet.md.

# GetTime

Ledger API

›

[gRPC API](https://docs.canton.network/reference/grpc-ledger-api-reference/overview.md)

›

[v2.testing](https://docs.canton.network/reference/grpc-ledger-api-reference/com-daml-ledger-api-v2-testing.md)

›

GetTime

com.daml.ledger.api.v2.testing

# GetTime

gRPC

RPC

`/com.daml.ledger.api.v2.testing.TimeService/GetTime`

## Protocol Details

Protocol
gRPC

Service
TimeService

RPC
GetTime

Client stream
No

Server stream
No

## Inputs

### GetTimeRequest

Message
com.daml.ledger.api.v2.testing.GetTimeRequest

Client stream
No

## Outputs

### GetTimeResponse

Message
com.daml.ledger.api.v2.testing.GetTimeResponse

Server stream
No

`current_time`
Timestamp

## Related Schemas

> [accordion] com.daml.ledger.api.v2.testing.GetTimeRequest

> [accordion] com.daml.ledger.api.v2.testing.GetTimeResponse
>
> `current_time`
> Timestamp

grpcurl

```bash grpcurl theme={"theme":{"light":"github-light","dark":"github-dark"}}
# Add -plaintext if the server is not using TLS.
grpcurl \
  -d @ \
  <HOST:PORT> \
  com.daml.ledger.api.v2.testing.TimeService/GetTime <<'EOF'
{}
EOF
```

OK

application/json

```json OK theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "currentTime": "string"
}
```
