Page 1 of 1

change timer status hotspot mikrotik

Posted: Sat Apr 14, 2012 10:53 pm
by irDi
Hi masters,
I wanna change the timer status hotspot mikrotik,
the default is, example: $(session-time-left)=> "2d3h23m45s".
I wanted to change like this "2day+ 3hour 23minutes 45second".
any idea?
is it from mikrotik-console(scripts) or using javascript on html page?
thanks a lot

Re: change timer status hotspot mikrotik

Posted: Sun Apr 15, 2012 8:16 pm
by perspetolis
hi
for example,if you want to convert real time to your request,you can use from this script:

:global ts [/system clock get time]
:set ts ([:pick $ts 0 2]. "Hour" .[:pick $ts 3 5]."Minutes".[pick $ts 6 8]."Second")
:put $ts

Re: change timer status hotspot mikrotik

Posted: Mon Apr 16, 2012 10:55 pm
by irDi
I mean, timer hotspot status (voucher) page on client-side.
the default from mikrotik on $(session-time-left) is => "2d3h23m45s".
I wanted to change like this "2day+ 3hour 23minutes 45second".