You are getting the command not found message because you need a space between the 'if' and the open bracket:
if [ $T1 -gt $T2 ] then
You will also likely receive an error once you fix that as '-gt' implies integer comparison, and your variables contain non-numeric chaaracters (colons). You might consider something like this:
t1="12000000"
t2="$(date "+%H%M%S")"
if [ $t1 -gt $t2 ]
then
echo true
else
echo false
fi
Both timestamps are created without colons and can be compared as integers.
Thank you for the replies. The placement of 'then' was important as was the space after 'if' ........Thank you, Agama! However I still needed further modification. Here is the script that works: