The event factory uses a default starts_at value of 1.hour.from_now. The EventPolicy's aar? method compares starts_at.beginning_of_day to Time.current to prevent an AAR being posted on an event that hasn't taken place yet (I guess?). This works fine except between 23:00 and 23:59 UTC, when 1.hour.from_now.beginning_of_day is afterTime.current.
The
event
factory uses a defaultstarts_at
value of1.hour.from_now
. TheEventPolicy
'saar?
method comparesstarts_at.beginning_of_day
toTime.current
to prevent an AAR being posted on an event that hasn't taken place yet (I guess?). This works fine except between 23:00 and 23:59 UTC, when1.hour.from_now.beginning_of_day
is afterTime.current
.Wow...
Example test failure: https://github.com/29th/personnel-v3/commit/5833e27d55d555fbb01e2d812fc6d1c21db22e6c