if ($now >= timelocal(0, 0, 0, 12, 8, 105) && $now < timelocal(0, 0, 0, 15, 8, 105))
{ $uri .= 'a.html'; }
elsif ($now >= timelocal(0, 0, 0, 15, 8, 105) && $now < timelocal(0, 0, 0, 18, 8, 105))
{ $uri .= 'b.html'; }
これでいいんじゃないのかい?
ソースの日付がずれてるだろ。