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

# Datetime

> Date and time functions in sh.stellarium.stdlib.Datetime.

```requestscript theme={null}
const datetime: sh.stellarium.stdlib.Datetime
```

## now

Returns the current date and time in UTC. Takes no parameters.

**value** `string`

The current UTC time in ISO 8601 format with millisecond precision, such as `2026-10-20T14:03:12.511Z`.

```requestscript theme={null}
request CurrentTime {
  const datetime: sh.stellarium.stdlib.Datetime

  const now = datetime.now()

  if (now.error != null) {
    return now.error.message
  }

  return now.value
}
```

```json Response theme={null}
{ "returnValue": "2026-10-20T14:03:12.511Z" }
```

> [!NOTE]
>
> The time comes from the clock of the node that hosts the standard library, not your node. When the call is forwarded to a peer, the value also reflects the network delay before that peer ran it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.