29th / personnel-v3

Personnel management system version 3
https://www.29th.org
2 stars 6 forks source link

Event AAR tests fail when run between 2300-2359 UTC #300

Open wilson29thid opened 4 months ago

wilson29thid commented 4 months ago

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 after Time.current.

Wow...

Example test failure: https://github.com/29th/personnel-v3/commit/5833e27d55d555fbb01e2d812fc6d1c21db22e6c