Modify Time

BlockTime

Add or subtract time from a Unix timestamp.

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

Inputs

Unix TimeRequired

Unix timestamp to modify. Provide @now for current time.

Example: @now

Days

Days to add or subtract.

Example: 1

Hours

Hours to add or subtract.

Example: 2

Minutes

Minutes to add or subtract.

Example: 30

Seconds

Seconds to add or subtract.

Example: -15

Outputs

Modified Time (Unix)

Resulting time in Unix seconds.

Example: 1700000000

Build a bot using blocks like Modify Time

Use this block in our visual flow editor. Bots are hosted 24/7 for free on inventor.bot.

Advanced Documentation

This documentation can be useful when using code mode. View as Markdown

ID: modify_time

Inputs

FieldInventScript nameValue
Unix Timeunix_timee.g. "@now"
Daysdayse.g. "1"
Hourshourse.g. "2"
Minutesminutese.g. "30"
Secondssecondse.g. "-15"

Outputs

FieldInventScript nameValue
Modified Time (Unix)modified_time_unixe.g. "1700000000"

Example InventScript

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,
})

More time blocks