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 |
State ⇒ Resolved
Milestone ⇒ 3.0.4
right day, verified with mothersday and fathersday, alos a look over
the months this year seems to me now correct
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.
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
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
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.
int(1304892000)
var_dump($holiday->getDate()->getTime());
New Attachment: var_dump.txt
$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
lib/Driver/Holidays.php, Kronolith_Driver_Holidays#listEvents().
pointer or something?
State ⇒ Feedback
Priority ⇒ 1. Low
State ⇒ Unconfirmed
New Attachment: Unbenannt.jpg
Patch ⇒ No
Milestone ⇒
Queue ⇒ Kronolith
Summary ⇒ mothersday at wrong date in calender
Type ⇒ Bug
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 )