[OneSignal Plugin] Timezone problem?

[OneSignal Plugin] Timezone problem?

  
Forge Component
(9)
Published on 19 Oct by OutSystems R&D
9 votes
Published on 19 Oct by OutSystems R&D

I use on-premise Enterprise Server, and server has correct timezone.


I sent notification with blank SendAfter property.


But it ends up scheduled 7 hours ahead (I'm in UTC +7 timezone).




Any thought?

Thanks.

Hello, Harlin,

Well, the default value for the "SendAfter" option is the value returned by "CurrDateTime()", which returns the server's configured Date and Time.

When calling OneSignal's REST endpoint, since no timezone is provided (Date Time conversions to Text don't include the timezone), OneSignal will assume that the scheduled time is on the UTC timezone.

Are there any constraints on your use-case in calling the CurrDateTime() function and adjusting it to match UTC time?

Best regards,

Carlos Simões

Right now I do manually addhours(currdatetime(), -7) to correct it.

But I've been using the old onesignal plugin for a long time, and it didn't have this timezone problem.