i use this - io example
get date from SysOp.log
Code:
proc iojTQ:DateAdded { user } {
...
if { [lindex $n 5] == "io" } {
if {[regexp -nocase -- ".*created user '$user'.*" $line]} {
#if { $iojTQ(debug) } { putlog "..iojTQ...: $line" }
set iojTQ(date_found) true
set temp [split [lindex $line 1] "-"]
set iojTQ(time) [clock scan "[lindex $temp 0]/[lindex $temp 1]/[lindex $temp 2] [lindex $line 2]" -gmt true]
}
};#io
...
}
set iojTQ(date_added) [iojTQ:DateAdded $iojTQ(user)]
...
set iojTQ(trial_end) [expr $iojTQ(date_added)+[expr $iojTQ(trial_days)*86400]]
if { $iojTQ(trial_end) <= $iojTQ(time_now) }
-> failed
...