Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Reef/src/main/java/dev/pranav/reef/routine/Routines.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import dev.pranav.reef.util.prefs
import org.json.JSONArray
import org.json.JSONObject
import java.time.DayOfWeek
import java.time.LocalDate
import java.time.ZoneId
import java.util.UUID

/**
Expand Down Expand Up @@ -155,7 +157,7 @@ object Routines {

val newSession = ActiveSession(
routineId = routine.id,
startTime = System.currentTimeMillis(),
startTime = LocalDate.now().atTime(routine.schedule.time).atZone(ZoneId.systemDefault()).toInstant().toEpochMilli(),
limits = routine.limits.associate { it.packageName to it.limitMinutes * 60_000L }
)
sessions.add(newSession)
Expand Down