I need to write a scope (or method) to query events based on the time of day - Basically I'd like to have "future" and "past" events - but at an offset that kicks in at 5AM.

The use case is a nightclub. At 1AM, the event is still going on, and the doorman still needs to use the event as if its up and coming. But by 5AM, the event is over, and the owners now want to see how it went.

I've got scopes like this (date is a datetime):

```
scope :future, -> { where("date >= ?", Date.today + 5.hours) }
scope :past, -> { where("date < ?", Date.today + 5.hours) }

```

That isn't working though. Does anyone have any insight on how I could do this?

EDIT: Always love the downvoters! I don't know how to put this more clearly. At 5AM on the event date, I want the event to fall into the past scope. Very simple question/problem. Have a great day haters.