[Tickets #8136] Date_Holidays bad event start hour

bugs at horde.org bugs at horde.org
Wed Apr 1 10:01:39 UTC 2009


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

Ticket URL: http://bugs.horde.org/ticket/8136
------------------------------------------------------------------------------
  Ticket             | 8136
  Created By         | dom.lalot at gmail.com
  Summary            | Date_Holidays bad event start hour
  Queue              | Kronolith
  Version            | 2.3.1
  Type               | Bug
  State              | Unconfirmed
  Priority           | 1. Low
  Milestone          |
  Patch              | 1
  Owners             |
------------------------------------------------------------------------------


dom.lalot at gmail.com (2009-04-01 06:01) wrote:

As you can see, there is something strange on some dates. I've got  
last Date_Holidays pear package as it was said to upgrade. On some  
dates, it was working correctly.. strange!

I trace and discovered this:

Apr  1 11:39:50 testDom HORDE[13801]: [kronolith] tracedom: Spring  
Bank Holiday [pid 13801 on line 204 of  
"/var/www/perso/horde-webmail-1.2.2/kronolith/lib/Driver/holidays.php"]
Apr  1 11:39:50 testDom HORDE[13801]: [kronolith] tracedom: deb Mon  
May 25 01:00:00 2009 [pid 13801 on line 209 of  
"/var/www/perso/horde-webmail-1.2.2/kronolith/lib/Driver/holidays.php"]
Apr  1 11:39:50 testDom HORDE[13801]: [kronolith] tracedom: fin Tue  
May 26 01:00:00 2009 [pid 13801 on line 210 of  
"/var/www/perso/horde-webmail-1.2.2/kronolith/lib/Driver/holidays.php"]

the events goes from 1h am to 1h am so lasting over two days.

I've made a quick and dirty patch in kronolith/lib/Driver/holidays.php  
in order to get it working properly:

--- /root/kronolith-h3-2.3.1/lib/Driver/holidays.php    2009-02-11  
23:15:37.000000000 +0100
+++ holidays.php        2009-04-01 11:54:51.000000000 +0200
@@ -201,11 +201,12 @@ class Kronolith_Event_holidays extends K
          $this->initialized = true;
          $this->setTitle(String::convertCharset($dhEvent->getTitle(),  
'UTF-8'));
          $this->setId($dhEvent->getInternalName());
-
          $this->start = new Horde_Date($dhEvent->_date->getTime());
          $this->end = new Horde_Date($this->start);
          $this->end->mday++;
          $this->end->correct();
+                 $this->start->hour=0;
+                 $this->end->hour=0;
      }

      /**

  * @version  CVS: $Id: Holidays.php,v 1.21 2009/02/09 11:38:32 kguest Exp $








More information about the bugs mailing list