in reply to Midnight wraparound.

DateTime is made for exactly this sort of thing. For instance, if you want to filter a list of events to find just the ones that occur in the next three hours from now, it goes something like this...
my $starttime = DateTime->now(); my $endtime = DateTime->now()->add( hours => 3); my @between = grep { DateTime->compare($_->when(), $starttime) >= 0 and DateTime->compare($endtime, $_->when) >= 0 } @eventtimes;

Well, something like that. The ->when() method may not be how you get a DateTime object for one of your events, but you can adjust that part to match your setup. Also, the >=0 condition may not be right, if you want open endpoints for instance. (The return value of compare is the same as that of the cmp and <=> operators would be if the comparison were string or numeric, respectively.)