Repeating iOSNotification time changes due to daylight savings

Hi,

So my app allows users to create a daily reminder that pops up as a notification at their desired time of day.

Here in Australia, we’ve just exited daylight savings, which has changed those daily reminder times by an hour.

What I’d like to happen is, if a user asks for a notification at 9 am every morning they continue to get that notification at 9 am even after a daylight savings transition.

I’d be happy if the notification occurred at the time the device thinks is 9 am rather than using what I guess is a static UTC +/- comparison.

My understanding is iOSNotificationCalendarTrigger only accepts the specified hour/minute and does its own secret determination of precisely what that time represents(?)

Can anyone help/shed any light on this?

Thanks heaps,
Canley

I think what you want is achieved using this property:
https://docs.unity3d.com/Packages/com.unity.mobile.notifications@2.1/api/Unity.Notifications.iOS.iOSNotificationCalendarTrigger.html#Unity_Notifications_iOS_iOSNotificationCalendarTrigger_UtcTime

1 Like

Ahh, thank you

Reviving this as daylight savings is back and my solution failed.

I had set notifications with UTC = False, with the intent to use local time. However, when daylight savings flipped over, all my notifications are out by an hour.

I think what it’s done is convert to UTC time in creating the recurring notification. So while the time is correct on creation, it becomes wrong once local time changes.

Unless I have created the trigger incorrectly.

Again, what I want is for the notification/reminder to fire according to the local time on the device - even if I’ve changed timezones or gone into daylight savings. If it’s 7 a.m. for me and my phone, I want the reminder to display.

I’m using visual scripting - here’s my creation logic.

(At least I’ve just worked out I can test this by manually changing the timezone on my phone SMH). :eyes:

Could you submit a bug for this?

Thank you I will. Do you know how it is intended to function?

Cheers,
Canley

Assuming you are talking about calendar trigger on iOS, I think it’s a bug to not be able to use current local time.

Thank you

Update for any who might have the same issue: this has been confirmed as a bug:

“Your bug report [iOS] Local time is ignored when iOSNotificationCalendarTrigger.UtcTime is set to false and the device’s local time changes has been confirmed”

Hi Aurimas,

I was notified this bug has been resolved in 2.3.1, which is great news:

“IN-56656 - [iOS] Local time is ignored when iOSNotificationCalendarTrigger.UtcTime is set to false and the device’s local time changes”

But the latest Mobile Notifications version available in Package Manager is 2.1.1. (My project is using Unity Editor 2021.3.22f1.)

How can I install 2.3.1? (Or even 2.3.0 for that matter.)

Thanks heaps,
Canley

It’s not yet released.
But the source code is publicly available here: https://github.com/Unity-Technologies/com.unity.mobile.notifications

Thanks heaps :slight_smile: