Closed fspc closed 6 years ago
The results for a shop created before 0 with hours after 24 were the same as beginning a shop after 0 with hours dialed back before 0.
new vol: 1hr 23 extra, 2hr 22 extra, 3hr 21 extra, 4hr 20extra, 5hr 19 extra .. 8hr 16 extra existing vol: 1hr 22 extra, 2hr 21 extra .. 8hr 16 extra (seemed skewed 1hr + after closing for testing)
ROUND(SUM(HOUR(SUBTIME( TIME(time_out), TIME(time_in))) + MINUTE(SUBTIME( TIME(time_out), TIME(time_in)))/60)) AS volunteer_hours ROUND(SUM(HOUR(SUBTIME( TIME(time_out), TIME(time_in))) + MINUTE(SUBTIME( TIME(time_out), TIME(time_in)))/60)) AS current_year_volunteer_hours
in the volunteer_benefits json call in transaction.php are where these answers are coming from; incorrect hours are coming from the same mysql statement in start_shop.
YBDB assumes a shop opens and closes within a 24hr period (0 - 24), however if a shop if opened after 0 (12 am), and someone logs in before 0, then weird things happen:
Test this by creating a shop before 0 to find out if same situation exists, since late night shops have been unusual.