in reply to time() searching

If you're using a SQL-ish database, look at the BETWEEN keyword or your database's date manipulation functions. Otherwise, you can easily derive the start of day and end of day epoch times from an epoch time. You just need to remeber that epoch time 0 is midnight in UTC and that there are 86400 seconds in a day. Therefore, any multiple of 86400 is midnight UTC:
my $timestamp = 1056360394; my $startofday = $timestamp - ($timestamp % 86400); my $endofday = $startofday + 86400;
Apply offsets as appropriate for your timezone. Figuring out whether a given epoch time is between $startofday and $endofday is trivial.