← Back to team overview

touch-packages team mailing list archive

[Bug 1512180] Re: [datetime] Standard alarms are not work correctly for Timers, after timezone/DST change

 

To start at the low level and working up:

ICAL

one way to handle a timer like this would be to anchor the timer in the originating timezone, then to define the trigger relative to that. for example, the ical event:
1. would have the start time equal to the creation time
2. would have the start/creation time specified with a specific timezone, eg nonfloating, so that point in time stays the same even when the user crosses timezones
3. set the trigger to execute 15 minutes after the start time; eg.  a VALARM containing "TRIGGER;RELATED=START:P15M"

So in Bartosz's example in comment #3, this would effectively say "X is
15 minutes after 9.00 AM Timezone +0, trigger this alarm at X+15 no
matter what timezone the user's in when X+15 happens."

QOrganizer

Our ical is currently generated by EDS, and our QOrganizer-to-EDS
converter is in qtorganizer5-eds. Looking at the relevant code there, eg
<http://bazaar.launchpad.net/~phablet-
team/qtorganizer5-eds/trunk/view/head:/organizer/qorganizer-eds-
engine.cpp#L2411>, this this kind of trigger will be created from a
QOrganizerItem that has a QOrganizerItemReminder with a visual or
audible component and which uses a relative offset via
QOrganizerItemReminder::secondsBeforeStart().

Ubuntu-ui-toolkit

It doesn't look like this is currently supported in ubuntu-ui-toolkit.
Its UCAlarm creates QOrganizerItemReminders in
AlarmDataAdapter::setMessage() <http://bazaar.launchpad.net/~ubuntu-sdk-
team/ubuntu-ui-
toolkit/trunk/view/head:/src/Ubuntu/Components/plugin/adapters/alarmsadapter_organizer.cpp#L107>
and AlarmDataAdapter::setSound() <http://bazaar.launchpad.net/~ubuntu-
sdk-team/ubuntu-ui-
toolkit/trunk/view/head:/src/Ubuntu/Components/plugin/adapters/alarmsadapter_organizer.cpp#L156>
but in both cases it explicitly calls reminder.setSecondsBeforeStart(0).

So if you're using QOrganizer directly, you should be able to craft your
QOranizerItemReminders s.t. this can work without any platform changes.
If this needs to be implemented through UCAlarm, then we'll need new
code in ubuntu-ui-toolkit.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to indicator-datetime in
Ubuntu.
https://bugs.launchpad.net/bugs/1512180

Title:
  [datetime] Standard alarms are not work correctly for Timers, after
  timezone/DST change

Status in Canonical System Image:
  Incomplete
Status in Timer:
  Confirmed
Status in Ubuntu Clock App:
  Incomplete
Status in indicator-datetime package in Ubuntu:
  Confirmed
Status in ubuntu-ui-toolkit package in Ubuntu:
  Incomplete

Bug description:
  Standard alarms will not work correctly after changing timezone and
  during DST change.

  Steps to reproduce:
  1. Install Timer from Store: https://uappexplorer.com/app/timer.mivoligo
  2. Set timer to 5 minutes
  3. Open Clock app. Look for alarm, and notice that alarm is correctly set
  3. Switch to System Settings -> Time & Date -> Time zone:
  4.  Change Time zone to something different (eg. New York). (Or wait for DST change: https://en.wikipedia.org/wiki/Daylight_saving_time)

  Expected behaviour:
  - timer ringing as expected after timezone/DST change

  Current behaviour:
  - alarm is not ringing. (you could check active alarms in "Ubuntu Clock app)

  Proposal solution:
  - introduce new type of alarms, which is based on UTC (https://en.wikipedia.org/wiki/Coordinated_Universal_Time) and independent from time zones.
  - This alatms will not be visible in applications which is using standard alarms (Ubuntu Clock, Ubuntu Calendar etc.)

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1512180/+subscriptions


References