6.0.0-beta1
7/6/25

[#9989] mothersday at wrong date in calender
Summary mothersday at wrong date in calender
Queue Kronolith
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester michael (at) bigmichi1 (dot) de
Created 04/26/2011 (5185 days ago)
Due
Updated 06/02/2011 (5148 days ago)
Assigned 04/26/2011 (5185 days ago)
Resolved 06/02/2011 (5148 days ago)
Github Issue Link
Github Pull Request
Milestone 3.0.4
Patch No

History
06/02/2011 07:42:13 PM Jan Schneider Assigned to Jan Schneider
State ⇒ Resolved
Milestone ⇒ 3.0.4
 
06/02/2011 06:36:12 PM michael (at) bigmichi1 (dot) de Comment #12 Reply to this comment
your commit fixed the issues that i had with the events not on the 
right day, verified with mothersday and fathersday, alos a look over 
the months this year seems to me now correct
06/02/2011 06:04:57 PM Jan Schneider Comment #11 Reply to this comment
So this basically means Date::getTime() is broken? You should report 
this in the PEAR bug tracker then. Since getDate() seems to work 
better, and the format is supported by Horde_Date, try what I committed.
06/02/2011 06:04:00 PM Git Commit Comment #10 Reply to this comment
Changes have been made in Git for this ticket:

Use getDate() which seems to work correctly, opposed to getTime() (Bug #9989).

  1 files changed, 1 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/4c52824152bdc4b3c6c369cfbe2a9a7d2da68e10
06/02/2011 01:48:49 PM michael (at) bigmichi1 (dot) de Comment #9 Reply to this comment
today i did some more debugging because fathersday is also at the 
wrong date 3.6.2011 instead of 2.6.2011.

i noticed that it has something to do with the timezone that is 
configured in php.ini "date.timezone = Europe/Berlin" and timezone set 
in linux /etc/localtime points also to Europe/Berlin

fathersday for example is stored in a Date object with the following values:
year = 2011
month = 06
day = 02
hour = 0
minute = 0
second = 0
partsecond = 0
on_standardyear = 2011
on_standardmonth = 06
on_standardday = 02
on_standardhour = 23
on_standardminute = 0
on_standardsecond = 0
on_standardpartsecond = 0
tz = Europe/Berlin

the interesting thing is that when i call $dhEvent->_date->getDate(4) 
the result is 20110602000000
when i call $dhEvent->_date->getDate(5) the result is 1307052000 which 
is 20110603000000

my suggestion is not to call getTime() here "new 
Horde_Date($dhEvent->_date->getTime());" but i haven't a idea what to 
call
05/22/2011 05:27:59 PM Jan Schneider Comment #8 Reply to this comment
This doesn't make any sense. This timestamp doesn't match *either* the 
date from Date_Holidays, nor the one that's displayed in Kronolith for 
you. No idea what's going on in your system, but I'm afraid you have 
to track this down yourself.
05/18/2011 07:06:29 PM michael (at) bigmichi1 (dot) de Comment #7 Reply to this comment
for your var_dump statement i got:


int(1304892000)

05/18/2011 04:00:25 PM Jan Schneider Comment #6 Reply to this comment
What's the output of:
var_dump($holiday->getDate()->getTime());
04/26/2011 07:33:43 PM michael (at) bigmichi1 (dot) de Comment #5
New Attachment: var_dump.txt Download
Reply to this comment
i did add some debug code to the line

  $event = new Kronolith_Event_Holidays($this, 
$holiday);if($event->title == "Muttertag"){echo var_dump($event);echo 
var_dump($holiday);echo var_dump($this);}

output is in the attached text file, after the event is created it has 
the wrong date
04/26/2011 05:18:47 PM Jan Schneider Comment #4 Reply to this comment
Events are converted from Date_Holidays to Kronolith in 
lib/Driver/Holidays.php, Kronolith_Driver_Holidays#listEvents().
04/26/2011 05:12:07 PM michael (at) bigmichi1 (dot) de Comment #3 Reply to this comment
anything where i can look whats going wrong here? some hint to a code 
pointer or something?
04/26/2011 04:37:13 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Can't reproduce, it's always on May 8 in any view for me.
04/26/2011 03:55:59 PM michael (at) bigmichi1 (dot) de Comment #1
Priority ⇒ 1. Low
State ⇒ Unconfirmed
New Attachment: Unbenannt.jpg Download
Patch ⇒ No
Milestone ⇒
Queue ⇒ Kronolith
Summary ⇒ mothersday at wrong date in calender
Type ⇒ Bug
Reply to this comment
there seems to be a problem with the data_holidays integration in 
kronolith. kronolith displays the motherday for germany at 01.05.2011 
when viewing the month may, but when viewing april it is not displayed 
at 01.05.2011. also the summary block shows mothersday at 01.05.2011 
on the frontpage of horde. have attached some screenshots where you 
can see the problem. Data_holidays calculates the right day as 
08.05.2011 which a vardump shows me.

Date Object ( [year] => 2011 [month] => 05 [day] => 08 [hour] => 0 
[minute] => 0 [second] => 0 [partsecond] => 0 [on_standardyear] => 
2011 [on_standardmonth] => 4 [on_standardday] => 30 [on_standardhour] 
=> 23 [on_standardminute] => 0 [on_standardsecond] => 0 
[on_standardpartsecond] => 0 [ob_countleapseconds] => [ob_invalidtime] 
=> [tz] => Date_TimeZone Object ( [id] => Europe/Berlin [offset] => 
3600000 [shortname] => CET [dstshortname] => CEST [longname] => 
Central European Time [dstlongname] => Central European Summer Time 
[hasdst] => 1 [on_summertimeoffset] => 3600000 
[on_summertimestartmonth] => 3 [os_summertimestartday] => lastSun 
[on_summertimestarttime] => 3600000 [on_summertimeendmonth] => 10 
[os_summertimeendday] => lastSun [on_summertimeendtime] => 3600000 ) 
[getWeekdayAbbrnameLength] => 3 )

Saved Queries