[Tickets #6183] Re: Kronolith gives premature notifications

bugs at horde.org bugs at horde.org
Fri Mar 21 09:51:10 UTC 2008


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/6183
-----------------------------------------------------------------------
 Ticket             | 6183
 Updated By         | michael.redinger at uibk.ac.at
 Summary            | Kronolith gives premature notifications
 Queue              | Kronolith
 Version            | 2.2-RC2
 Type               | Bug
 State              | Assigned
 Priority           | 2. Medium
 Milestone          | 
 Patch              | 
 Owners             | Horde Developers, Jan Schneider
+New Attachment     | horde-alarms.diff
-----------------------------------------------------------------------


michael.redinger at uibk.ac.at (2008-03-21 05:51) wrote:

I think I found the problem:
I suppose alarm_snooze should not be set to '1970-01-01 00:00:00'? For my
alarms, this is always true.
(See eric's horde_alarms sample below.)

I tracked the alarm notification to the select statement in
lib/Horde/Alarm/sql.php, function _list.
One of the conditions is:
alarm_snooze <= $time->rfc3339DateTime()

If alarm_snooze is set to 1970, this is always true.

eg.:
SELECT alarm_id, alarm_uid, alarm_start, alarm_end, alarm_methods,
alarm_params, alarm_title, alarm_text, alarm_snooze, alarm_internal FROM
horde_alarms WHERE alarm_dismissed = 0 AND ((alarm_snooze IS NULL AND
alarm_start <= '2008-03-21T10:10:07') OR alarm_snooze <=
'2008-03-21T10:10:07') AND (alarm_end IS NULL OR alarm_end >=
'2008-03-21T10:10:07') AND (alarm_uid = '' OR alarm_uid = 'myuser') ORDER
BY alarm_start, alarm_end;


I am using a MySQL database. In the horde SQL scripts, alarm_snooze is set
to DATETIME.
If you insert something into horde_alarms without setting alarm_snooze
explicitely, it is set to the start of unix time (1970).

Attaching a patch.




More information about the bugs mailing list