gawk
Code:
awk 'BEGIN{
#get time in seconds the script is run
now=systime()
current = strftime("%Y:%m:%d:%H:%m:%S",now)
print "Current date/time is: "current
onehr = 3600 #seconds in 1 hr
m=split("Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec",d,"|")
# convert "Jan" to "01" etc
for(o=1;o<=m;o++){
date[d[o]]=sprintf("%02d",o)
}
}
{
mth=date[$3] ; day=$2 ; year="20"$4
m=split($5,time,":")
hr=time[1] ; min=time[2] ; sec=time[3]
# prepare to pass to mktime() function
t=sprintf("%s %s %s %s %s %s" , year,mth,day,hr,min,sec)
log_entry_time = mktime(t)
if ( now - log_entry_time <= onehr ){
# if less than one hour, print
print $0
}
}' file
see
here for another similar example.