RE: Alarm API Feedback

Hi Jonas,

This makes sense for the targeted behavior, but the spec as written does not make this clear.  I would like to see the DST cases outlined in the spec.  Perhaps even including the two examples I provided, and the expected behavior of the implementation as you've described below.

-Giri

-----Original Message-----
From: Jonas Sicking [mailto:jonas@sicking.cc] 
Sent: Friday, January 18, 2013 12:43 AM
To: Mandyam, Giridhar
Cc: Dumez, Christophe; public-sysapps@w3.org
Subject: Re: Alarm API Feedback

On Thu, Jan 17, 2013 at 5:57 PM, Mandyam, Giridhar <mandyam@quicinc.com> wrote:
> 1.       add(new Date(2013, 3, 10, 2, 00, 00), "ignoreTimezone");
>
> a.       If I am in a location that respects DST on this date (e.g.
> California), this alarm could never go off.  This is because the clock 
> sprung forward at 01:59 on March 10.

No, the alarm will fire as soon as the runtime is running and the time is past the time the alarm is scheduled for. This is important to handle cases when the device is off at the time when the alarm should fire.

So the alarm will fire at 3am, i.e. one minute after 1:59am.

> b.      If am in a location that does not follow DST (e.g. Arizona), then
> this alarm will function as normal.

Yup.

> c.       Since the alarm was set before the DST event, the implementation
> has no way of being able to determine whether the alarm can be 
> triggered or not because the "ignoreTimezone" flag is set.  Ideally, 
> an add() of an alarm that cannot go off would result in an error.  So 
> how does the application know that an alarm event has been missed?

I hope the above description clarifies the situation?

> 2.       Add(new Date(2013,11,3,1,10,00),"ignoreTimezone");//Josh's example
>
> a.       In locations where DST is followed, the clock moves back at 01:59
> on Nov. 3.  Does the alarm go off twice now? Or is the alarm exhausted 
> upon the initial firing?

No, any alarm only fires once. For "ignoreTimezone" alarms it happens the first time that the device is running and the local time is past 1:10am November 3rd 2013. After that the alarm is deleted.

/ Jonas

Received on Friday, 18 January 2013 17:48:11 UTC