# How to create time-bound transactions · Chromia Docs (concept)

> This recipe demonstrates how to create transactions that are only valid within a specific time window using the timeb operation.

Source: https://docs.chromia.com/build/cookbook/transaction-creation/time-bound-transactions/

# How to create time-bound transactions

On this page

* [Prerequisites](#prerequisites)
* [Demo script](#demo-script)
* [Key Features](#key-features)
* [What timeb does](#what-timeb-does)
* [Learn more](#learn-more)

This recipe demonstrates how to create transactions that are only valid within a specific time window using the `timeb`
operation. Time-bound transactions enhance security and control by restricting when transactions can be included
on-chain.

JS/TS client

## Prerequisites

* **Node.js**
* **FT4 client:** `npm install @chromia/ft4`
* **Postchain client:** `npm install postchain-client`

## Demo script

* [Time-bound transactions demo](https://bitbucket.org/chromawallet/recipes/src/main/timebound/)

## Key Features

This recipe includes examples for:

* **Time window validation** - Restricting transaction execution to specific time periods
* **Offline transaction building** - Creating and signing GTX transactions with temporal constraints
* **Enhanced security** - Preventing replay attacks and ensuring timely execution
* **Transaction composition** - Combining transfers with time-bound operations

## What `timeb` does

The `timeb`(time bound) operation enforces a temporal condition on transaction validity by requiring that transactions
be included in a block only within a specified time window (in epoch milliseconds). This enhances control, security, and
synchronization of blockchain actions.

This operation requires that the client system's clock is reasonably synchronized with the signer node's clocks. While
minor discrepancies of a few seconds are generally acceptable, significant time differences, such as several hours, may
cause the operation to fail. This issue often arises from misconfigured system time settings, including incorrect time
zones or daylight saving time (DST) adjustments.

All timestamps are expected to be in **Coordinated Universal Time (UTC)**. However, if the system's timezone
configuration is incorrect, it may result in inaccurate UTC values, leading to unexpected validation failures during the
`timeb` operation.

## Learn more

* [FT4 client documentation](https://docs.chromia.com/build/clients/ft4-client/) — covers account management and FT4 operations.
* [JavaScript/TypeScript client](https://docs.chromia.com/build/clients/postchain-clients/javascript-typescript/reference/) — covers setup, connection,
  and usage patterns.
* [Generic Transaction Protocol (GTX)](https://docs.chromia.com/get-started/about/protocols/gtx/) — understanding GTX transaction structure.

[View this page on docs.chromia.com](https://docs.chromia.com/build/cookbook/transaction-creation/time-bound-transactions/)Content mirrored from the live docs
