# Modify Time

> Add or subtract time from a Unix timestamp.

- ID: `modify_time`
- Type: Block
- Category: [Time](https://inventor.bot/docs/reference/blocks/time.md)

> Add time by providing positive numbers, or subtract time by providing negative numbers.

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `unix_time` | yes | Unix timestamp to modify. Provide @now for current time. | e.g. `"@now"` |
| `days` |  | Days to add or subtract. | e.g. `"1"` |
| `hours` |  | Hours to add or subtract. | e.g. `"2"` |
| `minutes` |  | Minutes to add or subtract. | e.g. `"30"` |
| `seconds` |  | Seconds to add or subtract. | e.g. `"-15"` |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `modified_time_unix` | Resulting time in Unix seconds. | e.g. `"1700000000"` |

**Example**

```go
time := modify_time(Args{unix_time: "@now"})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "Modified Time (Unix): " + time.modified_time_unix,
})
```