Builtin-functions: Date & Time

@echo_current_time

Print the current time in “HH:mm:ss” format.

@echo_current_time

> 14:23:45

@echo_current_date

Print the current date in “YYYY-MM-DD” format.

@echo_current_date

> 2025-06-03

@time

Get Human readable values from a timestamp.

@time

@print $?

> [

>      hour => 13

>      min => 5

>      sec => 27

>      year => 2025

>      month => 6

>      day => 3

>      weekday => 2

>      yearday => 153

>      week => 23

> ]

@diff_time <start_time>, <end_time>

Return the difference in seconds between end_time and start_time.

@diff_time 1685799000, 1685799825

@echo $?

> 825

@format_time <timestamp>, <format_string>

Format the given Unix timestamp to a string according to format_string.

Example of format_string: “%Y-%m-%d %H:%M:%S”

@format_time 1685799825, “%Y-%m-%d %H:%M:%S”

@echo $?

> 2025-06-03 14:23:45

@now

Return the current timestamp with high precision (could include milliseconds).

@now

@echo $?

1685799825.345