(Parse.com) How to send push notification with local timezone

I have users from different time zones and I would like to send a push notification automatically using the cloud code at a specific time, say 20pm.

Problem I ran into: It sends push at 20pm UTC to everyone, so someone from China or France will not receive it at 20:00 local time, but the time corresponding to 20:00 UTC of the analysis server if I'm not I am wrong.

How can I send a push notification from cloud code at a specific time for each local user's time?

+3


source to share


1 answer


The best way I have come up with is to create a separate channel for each time zone you want to support, subscribe your users to the corresponding channel, and then send push notifications with localized time to each channel.



Note, however, that if China is the country you want to support, they only have one time zone for the entire very large country, which geographically spans five time zones. 8am in East China is also 8am in West China, although it should be 3am in West China.

0


source







All Articles