6.0.0-git
2019-03-19

[#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 2011-04-26 (2884 days ago)
Due
Updated 2011-06-02 (2847 days ago)
Assigned 2011-04-26 (2884 days ago)
Resolved 2011-06-02 (2847 days ago)
Milestone 3.0.4
Patch No

History
2011-06-02 19:42:13 Jan Schneider Assigned to Jan Schneider
State ⇒ Resolved
Milestone ⇒ 3.0.4
 
2011-06-02 18:36:12 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
2011-06-02 18:04:57 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.
2011-06-02 18:04:00 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
2011-06-02 13:48:49 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
2011-05-22 17:27:59 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.
2011-05-18 19:06:29 michael (at) bigmichi1 (dot) de Comment #7 Reply to this comment
for your var_dump statement i got:


int(1304892000)

2011-05-18 16:00:25 Jan Schneider Comment #6 Reply to this comment
What's the output of:
var_dump($holiday->getDate()->getTime());
2011-04-26 19:33:43 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
2011-04-26 17:18:47 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().
2011-04-26 17:12:07 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?
2011-04-26 16:37:13 Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
Can't reproduce, it's always on May 8 in any view for me.
2011-04-26 15:55:59 michael (at) bigmichi1 (dot) de Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ mothersday at wrong date in calender
Queue ⇒ Kronolith
Milestone ⇒
Patch ⇒ No
New Attachment: Unbenannt.jpg Download
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