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

CapacitorNotification Android scheduler #102

Open
faller222 opened this issue Aug 18, 2024 · 2 comments
Open

CapacitorNotification Android scheduler #102

faller222 opened this issue Aug 18, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@faller222
Copy link

Regarding this, I'm using "@capacitor/background-runner": "1.1.0", I have found two problems.

  • First, scheduleAt is mandatory since you are trying to parse with out default data.
  • Second, I had to manipulate my date with a TZ offset since sending new Date() is a 3 hours in the future notification
@faller222
Copy link
Author

here is the line is failing if I dont send scheduleAt

@faller222
Copy link
Author

Here is my workaround for the second issue

const magicOffset = new Date().getTimezoneOffset() * 60 * 1000

function fixDate(date){
    return new Date(date.getTime() - magicOffset)
}

@theproducer theproducer self-assigned this Sep 6, 2024
@theproducer theproducer added the bug Something isn't working label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants