alarms are one hour off when clock has changed due to daylight savings

Bug #290733 reported by Erik Dalén
40
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Alarm Clock Applet
Fix Released
Low
Johannes H. Jensen
alarm-clock-applet (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Won't Fix
Undecided
Unassigned
Quantal
Fix Released
Undecided
Unassigned

Bug Description

When an alarm is set before a daylight savings time change to a
time after the time change, the alarm will go off at a time one hour off.

I'd suspect it checks how long it is until the next alarm and sleeps (sets an alarm) in that many seconds. And when the time left changes in the middle of it the original calculation will be wrong.

Revision history for this message
Johannes H. Jensen (joh) wrote :

Thank you for your bug report.
Actually, Alarm Clock stores the UNIX timestamp for the alarm trigger which it generates with mktime(). I'll investigate further.

Changed in alarm-clock:
assignee: nobody → joh
importance: Undecided → Low
Revision history for this message
Carl Krucke (ckrucke) wrote :

On the Monday after the most recent time change, I was counting on Alarm Clock to remind me to pick my daughter up from school as usual. I happened to hover the mouse over the taskbar icon, and the help-tip looking thing popped up and I noticed it was counting down to an an hour after the correct set time. I opened the edit window for that alarm and changed a number and changed it back to the same number, and closed out. Now the hovering timer showed the correct countdown time. Same behavior previously reported, but I wanted to bring it back to your attention, as I found it to be of greater than "Low" importance.

Great program otherwise.

Revision history for this message
Johannes H. Jensen (joh) wrote :

Good news, everyone! This bug has been fixed in rev 211.

Changed in alarm-clock:
status: New → Fix Committed
Revision history for this message
Mannex (russ-mannex) wrote :

This is still happening in 3.2 on Ubuntu 11.10. Any ideas when a fix will be available?

Revision history for this message
Johannes H. Jensen (joh) wrote : Re: [Bug 290733] Re: alarms are one hour off when clock has changed due to daylight savings

On Sun, Nov 6, 2011 at 16:18, Mannex <email address hidden> wrote:
> This is still happening in 3.2 on Ubuntu 11.10. Any ideas when a fix
> will be available?

A fix has been available in trunk for quite some time[1], but a
release has not yet been made with the fix. It will be included in the
next release, of which there is no ETA unfortunately.

[1] http://bazaar.launchpad.net/~joh/alarm-clock/trunk/revision/211

Revision history for this message
Stephen A. Goss (postfuturist) wrote :

I was notified of my 10:30 am meeting at 11:30 am this morning.

Johannes H. Jensen (joh)
Changed in alarm-clock:
milestone: none → 0.3.3
Revision history for this message
gord-s (gord-sssnaps) wrote :

I appreciate this has been fixed in trunk and committed. This clarification is for troubleshooting any future similar trouble in this or similar code; similar bugs will only occur twice a year so will be less "visible" than normal bugs. This is purely for reference in case this needs to be revisited, or for someone with a similar problem that could be pointed towards the patch for code re-use.
LTS users will have to use the workaround below for a some time (sorry about the pun)

After a few minutes testing this morning, (clocks changed to 1 hour ahead for summer) the alarms made before the timezone change were 1 hour late, even after logout/login cycle and then a planned reboot.

Workaround is to delete all alarms and remake them manually. Similarly, when timezone changes back, all alarms will be off-by-one-hour until deleted and remade again.

(thanks for useful prog btw)

Johannes H. Jensen (joh)
Changed in alarm-clock:
status: Fix Committed → Fix Released
Changed in alarm-clock-applet (Ubuntu):
status: New → Fix Released
Revision history for this message
Chow Loong Jin (hyperair) wrote : Subscribe ubuntu-sru and set precise task status

  affects ubuntu/precise/alarm-clock-applet
  status confirmed
  subscribe ubuntu-sru

--
Kind regards,
Loong Jin

Changed in alarm-clock-applet (Ubuntu Precise):
status: New → Confirmed
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

This bug is missing information detailed in https://wiki.ubuntu.com/StableReleaseUpdates#Procedure for it to comply with Stable Release Updates process. Please add a test case for recreating and the regression potential. Once this information is added to all the bugs addressed by the package in -proposed we will approve the upload. Thanks!

Revision history for this message
Chris Halse Rogers (raof) wrote :

I've rejected this from the precise-proposed queue; changing the debhelper compat level is not a minimal change, and is not appropriate for an SRU.

The rest of the changes look good, however. Feel free to re-upload a package without that change (and update the bug with a test-case and regression potential/where-to-look-for-regressions section).

Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in alarm-clock-applet (Ubuntu Precise):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.