APM variable assign examples
Problem this snippet solves: APM variable assign is a powerful tool to manipulate APM variable during policy evaluation supporting tcl code.
On Devcentral answers, there are lots of variable assig...
Updated Jun 06, 2023
Version 2.0Stanislas_Piro2
Cumulonimbus
Joined January 04, 2011
Ismaeel_Butt_30
Feb 19, 2018Nimbostratus
Hi Stanislas,
I have found your solution of variable assign to terminate APM session on particular time.
set endhour 22; set endmin 18; set starthour [clock format [mcget {session.user.starttime}] -format %H]; set startmin [clock format [mcget {session.user.starttime}] -format %M]; return [expr {( $endhour * 3600 ) + ( $endmin * 60 ) - ( $starthour * 3600 ) - ( $startmin * 60 )}]
Can we add date and month as well along with time in this format ? E.G. i want to terminate APM session on March 10, 2018 at 17:00. Can you please advise if this is possible and what will be the syntax?