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
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1512180

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

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

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to