Change AutoResponse Global Template based on time of the day

rjandric rjandric at
Mon Oct 20 10:15:32 EDT 2014

OK, I've been trying with the following condition:

($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();
if ($hour >=8 && $hour <=17) {

} elsif ($hour < 8 && $hour > 17) {

return 1;
 But regardless of the conditions in if/elif I get both replies, from
Autoreply and AutoReply-AfterHrs templates. The logis seems OK, but I can't
tell where am I making a mistake. I have included a couple of screenshot
s for both scrips.

View this message in context:
Sent from the Request Tracker - User mailing list archive at

More information about the rt-users mailing list