Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ###################################################################
- #
- # FOR ROUTER OS v7.10 (later)
- #
- # Return MMM d, YYYY, H:M:s
- #
- # Edit to support RouterOS v7.10
- # release: 16/06/2023
- # You should be save with name "func_LINEdateTime" in you router, or anyone else but edit in main script also
- #
- ####
- :local date
- :local time
- :local monthr {"Jan";"Feb";"Mar";"Apr";"May";"Jun";"Jul";"Aug";"Sep";"Oct";"Nov";"Dec"}
- :set date [/system clock get date]
- :set time [/system clock get time]
- :local yy [:tostr [:pick $date 0 4]]
- :local dd [:tostr [:pick $date 8 10]]
- :local mm [:tonum [:pick $date 5 7]]
- :local mmStr "$[:pick $monthr ($mm-1)]"
- # DD/MM/YY - HH:MM:SS
- # :set $res "$dd/$mm/$yy - $time"
- # MMM DD, YY - HH:MM:SS
- :set $res "$mmStr $dd, $yy - $time"
- :return $res
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement