pushok
pushok copied to clipboard
apns-expiration may be zero
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?
Any response?
Setting it to date 1970-01-01 00:00:00 does the job, which make the getTimestampe() function to return 0