Adjusted for midnight goal

This commit is contained in:
Maximilian Giller 2024-01-21 22:36:50 +01:00
parent d9dad4ab91
commit 790ed4a7ae

View file

@ -76,8 +76,7 @@ storeActivity($activity);
// Handle sleep streak // Handle sleep streak
$startingHour = (int) date("H"); $startingHour = (int) date("H");
$startingMinute = (int) date("i"); if ($activity->title == "Sleeping" && $startingHour > 18) {
if ($activity->title == "Sleeping" && $startingHour > 15 && ($startingHour < 22 || ($startingHour == 22 && $startingMinute <= 5))) {
markTodayAsSuccess("sleep"); markTodayAsSuccess("sleep");
} }