Skip to content

Use LocalDate for session start time calculation#36

Closed
alv-cor wants to merge 2 commits intoaload0:mainfrom
alv-cor:fix/routine-start
Closed

Use LocalDate for session start time calculation#36
alv-cor wants to merge 2 commits intoaload0:mainfrom
alv-cor:fix/routine-start

Conversation

@alv-cor
Copy link
Contributor

@alv-cor alv-cor commented Jan 19, 2026

Replaced System.currentTimeMillis() with LocalDate.now().atTime(...).atZone(...).toInstant().toEpochMilli() for more accurate session start time based on the routine's scheduled time and system time zone.

alv-cor and others added 2 commits January 19, 2026 15:38
Replaced System.currentTimeMillis() with LocalDate.now().atTime(...).atZone(...).toInstant().toEpochMilli() for more accurate session start time based on the routine's scheduled time and system time zone.
@PranavPurwar
Copy link
Member

The rest of the app still uses System.currentTimeMillis() for calculation, so changing it just here might cause issues.

@alv-cor
Copy link
Contributor Author

alv-cor commented Jan 27, 2026

According to my tests, routines were not working correctly with System.currentTimeMillis(), and it makes sense, since this is not the start time of the routine. I cannot check it since I am using my own version now with this fix, but I encourage you to test it too.

@alv-cor alv-cor closed this Jan 30, 2026
@alv-cor alv-cor deleted the fix/routine-start branch January 30, 2026 13:20
@alv-cor alv-cor restored the fix/routine-start branch January 30, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants