[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [local‑first/Storage](https://evolu.dev/docs/api-reference/common/local-first/Storage) › getTimestampInsertStrategy

```ts
function getTimestampInsertStrategy(
  timestamp: Uint8Array<ArrayBufferLike> &
    Brand<"Length16"> &
    Brand<"TimestampBytes">,
  firstTimestamp: Uint8Array<ArrayBufferLike> &
    Brand<"Length16"> &
    Brand<"TimestampBytes">,
  lastTimestamp: Uint8Array<ArrayBufferLike> &
    Brand<"Length16"> &
    Brand<"TimestampBytes">,
): [
  StorageInsertTimestampStrategy,
  Uint8Array<ArrayBufferLike> & Brand<"Length16"> & Brand<"TimestampBytes">,
  Uint8Array<ArrayBufferLike> & Brand<"Length16"> & Brand<"TimestampBytes">,
];
```

Defined in: [packages/common/src/local-first/Storage.ts:554](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/local-first/Storage.ts#L554)

Determines the insertion strategy for a timestamp based on its position
relative to the current first and last timestamps.

Returns a tuple with the strategy and updated timestamp bounds.