How to find expo push notification received date in iOS?

Please provide the following:

  1. SDK Version: 40
  2. Platforms(Android/iOS/web/all):ios

In iOS receiving data in push notification having date. But that date is in float format. if i convert it will show old dates not exact date. But in android it come in int works correctly.

For example:in iOS {“date”:1610985838.1420956}
if i convert this to date format. i got Mon Jan 19 1970 20:59:45 GMT+0530 (India Standard Time) {}
but in android “date”:1610971751237"
it gives correct date.

how to convert in ios date format in push notification received message.Please help me to find out this.

Hey @alamu, I’ll have to investigate internally if returning a float is the expected behavior. Regardless, you could call Math.round() on the ios date value to get a workable unix timestamp that can be converted to a readable/accurate date as a workaround (be it temporary or not).


1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.