Code:
set time_now [clock seconds]
set time_formated [clock format $time_now -format {%Y-%m-%d %H:%M:%S} -gmt true]
set file_time ""
set file_formated ""
if { [file exist "x:/path/file"] } {
set reply [open "x:/path/file" "r+"]
while {![eof $reply]} {
set line [gets $reply]
if { [regexp -nocase -- {[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,2} [0-9]{1,2}:[0-9]{1,2}} $line out] } {
set file_time $out
set file_formated [clock scan "$out" -gmt true]
iputs -nobuffer "time_now......: $time_now"
iputs -nobuffer "time_formated.: $time_formated"
iputs -nobuffer "line..........: $line"
iputs -nobuffer "file_time.....: $file_time"
iputs -nobuffer "file_formated.: $file_formated"
}
}
close $reply
}