kalyanbk
kalyanbk

Reputation: 153

Is there a way to include local time and timezone on APNS Push messages

I need to send out an APNS Push Notification message that needs to include time in the alert message. Is there a way to display this time in the local timezone of the end user (based on current geographic location)?

Upvotes: 3

Views: 1617

Answers (1)

Eran
Eran

Reputation: 393781

If the time is part of the alert, there's no way to do that, since you have no control on the display of the alert (except for the language, which can be controlled by sending a loc-key parameter, which gets translated to an actual text in the device, based on the language the device uses).

If you pass the time as a custom parameter of the payload, you can process it in your app and display it however you want (assuming the application was already running, or that the user tapped the notification if it wasn't already running).

If the time is part of the alert text, you'll have to determine the timezone in the server and send the time as it should be displayed.

Upvotes: 2

Related Questions