Why awk ? Ruby (or similar scripting language) would make this trivial as there would be no need to modify the input line. For instance:
#!/usr/bin/env ruby
require 'time'
two_hours = 60 * 60 * 2
while line = gets
ts = Time.parse(line.chomp)
now = Time.now
if now - ts < two_hours
puts "#{line} is less than two hours ago"
end
end
Which produces the following
2012-01-17 06:15:12 is less than two hours ago
2012-01-17 07:15:12 is less than two hours ago
when provided
2012-01-17 04:15:12
2012-01-17 05:15:12
2012-01-17 06:15:12
2012-01-17 07:15:12
L7Sqr
Practically a Master Poster
657 posts since Feb 2011
Reputation Points: 201
Solved Threads: 124
Alright. Well, you have two options then. Modify the code I pasted to handle the input lines you are dealing with (trivial since Ruby supports regular expressions as part of the language) or massage the contents of your input such that awk can handle them. You are going to want to use mktime (if you are using GNU awk) which expects an input in the following format: YYYY MM DD HH MM SS [DST] .
L7Sqr
Practically a Master Poster
657 posts since Feb 2011
Reputation Points: 201
Solved Threads: 124