> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# Set Next Timestamp \[block.setNextTimestamp]

Sets the next block's timestamp.

## Usage

This example sets the next block's timestamp.

:::code-group
```ts twoslash [example.ts]
import { client } from './viem.config'

await client.block.setNextTimestamp({
  timestamp: 1_700_000_000n,
})
```

```ts twoslash [viem.config.ts] filename="viem.config.ts"
import { Client, http, testActions } from 'viem'
import { anvil } from 'viem/chains'

export const client = Client.create({
  chain: anvil,
  transport: http(),
}).extend(testActions())
```
:::

### Standalone Action

Call `Actions.block.setNextTimestamp` directly by passing the Client as the first argument.

:::code-group
```ts twoslash [example.ts]
import { Actions } from 'viem'
import { client } from './viem.config'

await Actions.block.setNextTimestamp(client, {
  timestamp: 1_700_000_000n,
})
```

```ts twoslash [viem.config.ts] filename="viem.config.ts"
import { Client, http } from 'viem'
import { anvil } from 'viem/chains'

export const client = Client.create({
  chain: anvil,
  transport: http(),
})
```
:::

## Return Value

`void`

No value is returned.

## Parameters

### timestamp

* **Type:** `bigint`

The timestamp (in seconds) to set.

```ts twoslash
import { Actions, Client, http } from 'viem'
import { mainnet } from 'viem/chains'

const client = Client.create({
  chain: mainnet,
  transport: http(),
})
// ---cut---
await Actions.block.setNextTimestamp(client, {
  timestamp: 1_700_000_000n, // [!code focus]
})
```
