<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Horde Alarms and Kronolith Alerts Use Different Timezones for SQL Queries</title> 
  <pubDate>Fri, 10 Apr 2026 13:09:15 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/8381</link> 
  <atom:link rel="self" type="application/rss+xml" title="Horde Alarms and Kronolith Alerts Use Different Timezones for SQL Queries" href="https://bugs.horde.org/ticket/8381/rss" /> 
  <description>Horde Alarms and Kronolith Alerts Use Different Timezones for SQL Queries</description> 
 
   
   
  <item> 
   <title>I&#039;ve been continually hunting a bug where Kronolith event al</title> 
   <description>I&#039;ve been continually hunting a bug where Kronolith event alarms do not have working emails sent.  My setup is:



- PostgreSQL 8.1

- PHP 5.1.6

- CentOS 5.2

- Apache 2.2

- Hardware clock and configured local timezone are UTC



The Horde default timezone is America/New_York, currently -4 UTC, and is the configured time zone on the account I am using to test this bug.



When Kronolith&#039;s SQL driver performs _listAlarms, on a test event with alarm I created, it returns the alarm using the local time zone of New_York.  (for example, 14:00)  Passing back up to the Horde Alarm _set function, the time stays the same: 14:00.  In the horde_alarms table in the database, the result is (again for emphasis) 14:00 when queried from a local psql command line.



What happens next is that the Horde frameworks&#039; Alarm/sql.php, in the _list function, uses a $time-&gt;rfc3339DateTime() value to query for current alarms in the system local time zone, in my case, UTC.  The result is that the _list function is looking for alarms at 18:00, while the _set function stored the alarm as happening at 14:00.



To a human sitting at his desk, this is the same time once timezones are involved.  However, the field in the database is a timestamp without a timezone type, and the Horde logic and SQL queries do not take into account timezones.



As a result, no Kronolith email alerts are sent from my Horde install.



I&#039;d be happy to contribute a patch if one of the Horde devs would provide guidance on what would be an acceptable solution.  Converting all alarms to use UTC time would, I think, be the fastest ideal solution.</description> 
   <pubDate>Fri, 26 Jun 2009 18:47:41 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8381#t54694</link> 
  </item> 
   
  <item> 
   <title>In Horde 4, alarms are stored in UTC now, so that they can b</title> 
   <description>In Horde 4, alarms are stored in UTC now, so that they can be stored and received timezone agnostic.</description> 
   <pubDate>Fri, 29 Jan 2010 23:43:34 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/8381#t57803</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
