Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timezone aware scheduling of Alarms #99

Merged
merged 26 commits into from
Mar 9, 2025
Merged

Conversation

Joshix-1
Copy link
Contributor

@Joshix-1 Joshix-1 commented Oct 28, 2024

Reproduce Problem 1 (before this fix):

  • Set device time to Sat. 2024-10-26 10:00 with timezone of Europe/Berlin
  • Schedule alarm for Sunday (after 3 am)
  • See that the time is wrong

Reproduce Problem 2 (before this fix):

  • Create a single alarm that for the current weekday before the current time
  • See under the clock that the alarm is scheduled for in six days on the wrong day

What is it?

  • Bugfix
  • Codebase improvement

Description of the changes in your PR

  • Fix scheduling of next alarms

Before/After Screenshots/Screen Record

  • Before:
  • After:

Fixes the following issue(s)

Relies on the following changes

Acknowledgement

@Joshix-1 Joshix-1 marked this pull request as ready for review October 28, 2024 12:17
@Joshix-1 Joshix-1 changed the title Timezone aware sheduling of Alarms Timezone aware scheduling of Alarms Oct 28, 2024
@Joshix-1
Copy link
Contributor Author

Joshix-1 commented Nov 13, 2024

I've been using this now for a while and i didn't encounter any issues.
./gradlew assemble just works and produces a working apk.

./gradlew build complains about the version of a dependency

./gradlew build
> Task :app:lintReportCoreDebug
Wrote HTML report to file:///home/josh/code/FossifyClock/app/build/reports/lint-results-coreDebug.html

> Task :app:lintCoreDebug FAILED
Lint found 21 errors, 0 warnings (140 errors, 1 warning filtered by baseline lint-baseline.xml). First failure:

/home/josh/code/FossifyClock/gradle/libs.versions.toml:28: Error: A newer version of com.android.application than 8.3.1 is available: 8.7.2. (There is also a newer version of 8.3.𝑥 available, if upgrading to 8.7.2 is difficult: 8.3.2) [AndroidGradlePluginVersion]

The full lint text report is located at:
  /home/josh/code/FossifyClock/app/build/intermediates/lint_intermediate_text_report/coreDebug/lintReportCoreDebug/lint-results-coreDebug.txt

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lintCoreDebug'.
> Lint found errors in the project; aborting build.
  
  Fix the issues identified by lint, or add the issues to the lint baseline via `gradlew updateLintBaseline`.
  For more details, see https://developer.android.com/studio/write/lint#snapshot
  
  Lint found 21 errors, 0 warnings (140 errors, 1 warning filtered by baseline lint-baseline.xml). First failure:
  
  /home/josh/code/FossifyClock/gradle/libs.versions.toml:28: Error: A newer version of com.android.application than 8.3.1 is available: 8.7.2. (There is also a newer version of 8.3.𝑥 available, if upgrading to 8.7.2 is difficult: 8.3.2) [AndroidGradlePluginVersion]
  
  The full lint text report is located at:
    /home/josh/code/FossifyClock/app/build/intermediates/lint_intermediate_text_report/coreDebug/lintReportCoreDebug/lint-results-coreDebug.txt

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 12s
259 actionable tasks: 5 executed, 254 up-to-date

@Joshix-1
Copy link
Contributor Author

@naveensingh can you - or someone else - please take a look at this? It would be nice if #61 got fixed. That's a really critical bug (I've been hit by it multiple times over the last few years using SMT/Fossify Clock)

@naveensingh
Copy link
Member

Clock is to be updated in the coming weeks, I'll check it out then.

@naveensingh naveensingh added the testers needed We need testers for this issue or pull request label Nov 18, 2024
@Joshix-1
Copy link
Contributor Author

I don't know how #73 happened, but this pr should fix it.

@Joshix-1 Joshix-1 mentioned this pull request Jan 28, 2025
4 tasks
@naveensingh naveensingh self-assigned this Mar 5, 2025
@naveensingh
Copy link
Member

I tested this a couple times on a couple devices and it works 🎉

I discovered that sometimes the alarms won't trigger when date-time is manually changed in system settings but that is out of scope for this PR.

Thank you!

@naveensingh naveensingh merged commit 1cc26e7 into FossifyOrg:master Mar 9, 2025
2 of 4 checks passed
@naveensingh naveensingh removed the testers needed We need testers for this issue or pull request label Mar 9, 2025
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.

Summer time issues
2 participants