I can get the last-handshake value with a script:
Code: Select all
:put [/interface/wireguard/peers/get 0 last-handshake ]
00:00:45
It only has this vague description: "time - date and time value".
But clearly, the expression 10000m is not a date:
Code: Select all
:put 10000m
6d22:40:00
Code: Select all
:put [/system/clock get time]
14:57:35
:put [/system/clock get date]
2023-11-20
:put [/system/script/get 0 last-started ]
2023-11-19 20:00:00
Some operators seems logical, but they do not work as expected. Here is an example:
Code: Select all
> :put [ [/system/script/get 0 last-started ] ]
2023-11-19 20:00:00
> :put [ [/system/script/get 0 last-started ] + 10m ]
2023-11-19 20:00:00
Here are some questions.
- What is the type of the value that is printed as 6d22:40 ?
- What is the type of the value that is printed as 14:57:35 ?
- What is the type of the value that is printed as 2023-11-20 ?
- What is the type of the value that is printed as 2023-11-19 20:00:00 ?
- Out of these four things, which ones are documented, and which ones aren't?
- How can I access various properties of these values? (For example, year number in a date, or total number of sedconds in an interval)
- Are there any operators that work on this/these types?