Local notifications not showing up

Hi, I’ve been testing the local notification system.

It works well when I use a time in seconds for the notification to show up from now, but when I try to set a date it doesn’t show up.

Are there any knows issues with this?

What I was doing for testing purposes was like in the API:

local utcTime = os.date( "!\*t", os.time() + 30)  
system.scheduleNotification( utcTime, { alert = "whatever" })  

The notification doesn’t show up in 30 seconds as it should. I also tried adding and subtracting 3600 seconds (1 hour) to see if it was for example DST issues but didn’t fix it.

Any help is appreciated.

Thanks!

Manuel [import]uid: 61899 topic_id: 21458 reply_id: 321458[/import]

@Manuel,
The date setting is a UTC time, so you will have to substract/Add the number of hours from UTC time based on your timezone. For e.g US eastern time zone is 5 hours behind the UTC. Check out this time.gov link
http://www.time.gov/timezone.cgi?Eastern/d/-5/java

Since my clients are across timezones , i have always used the seconds parameter instead of the date parameter for setting notifications. It removes all hassles with day light saving etc…

system.scheduleNotification( secondsFromNow [, options] )  

Hope this helps.
Bejoy [import]uid: 84539 topic_id: 21458 reply_id: 84970[/import]

I thought that I would have to take into consideration the timezone but when printing os.date("*t") I would get my current time, so I though it would handle timezones itself, apparently not. Thanks!

One other question then is what is the limit on seconds I can provide as parameter if there is one?

I want to schedule for a month period to have some notifications showing every 2 days, so I’m going to have to use some big numbers for seconds, and I’m afraid there is some limitation though apparently there is none described on the API. [import]uid: 61899 topic_id: 21458 reply_id: 84986[/import]

Manuel - There is no limitation that i am aware of. For your logic, just loop through a monthly for loop and schedule notifications 2*8*60 = 960seconds apart and you should be good…
[import]uid: 84539 topic_id: 21458 reply_id: 85003[/import]

Eheh, I wouldn’t be so good with 960 as 2 days :stuck_out_tongue:

It should actually be 2(d)*24(h)*60(m)*60(s) = 172800 seconds

Thanks for the quick answers! [import]uid: 61899 topic_id: 21458 reply_id: 85009[/import]

:)… That is correct…All thoughts mixed up today morning !! [import]uid: 84539 topic_id: 21458 reply_id: 85014[/import]