Script to Test WAN and Reset USB Power on Down?

Rex, my apologies, but the test was performed with the global variable of this link:

is logically not valid because the result is not as expected.

[admin@MikroTik] > :local nstart [$unixtodatetime ([:timestamp] + 30m)] ; :put "Start date: $($nstart->0) and start time: $($nstart->1)"
Start date:  and start time:

By copying the code of the function “unixtodatetime” from this thread, if it works, my apologies again.