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

apns-expiration may be zero #105

Open
chimit opened this issue May 5, 2020 · 2 comments
Open

apns-expiration may be zero #105

chimit opened this issue May 5, 2020 · 2 comments

Comments

@chimit
Copy link
Contributor

chimit commented May 5, 2020

According to the APNS documentation apns-expiration header may be a Unix timestamp down to 0. But the setExpirationAt() method requires a DateTime value only and converts it to the Unix timestamp before sending it to the APNS. The way you can make it work looks too cumbersome at the moment:

$notification->setExpirationAt(date_create('1970-01-01 00:00:00', timezone_open('UTC')));

Any ideas on how to improve the developer experience here?

@webocoders
Copy link

Any response?

@zaidiqbal
Copy link

zaidiqbal commented Mar 12, 2024

Setting it to date 1970-01-01 00:00:00 does the job, which make the getTimestampe() function to return 0

image

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

No branches or pull requests

3 participants