Summary | Display glitch on anniversary dates in the year 1900/1901 |
Queue | Turba |
Queue Version | Git master |
Type | Bug |
State | Not Reproducible |
Priority | 1. Low |
Owners | |
Requester | thomas.jarosch (at) intra2net (dot) com |
Created | 12/09/2012 (4604 days ago) |
Due | |
Updated | 01/27/2016 (3460 days ago) |
Assigned | 12/13/2012 (4600 days ago) |
Resolved | 01/27/2016 (3460 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
fixes for
bug 11831?for
bug 11831?If I remove that from the "date_format" pref, it renders fine.
--- a/framework/Form/lib/Horde/Form/Type.php
+++ b/framework/Form/lib/Horde/Form/Type.php
@@ -2968,6 +2968,12 @@ class Horde_Form_Type_monthdayyear extends
Horde_Form_Type {
$date = $this->getDateOb($date);
}
+ $fp = fopen("/tmp/tomj_dateformat.log", "a");
+ fprintf($fp, print_r($date,true)."\n");
+ fprintf($fp, "%s",print_r($this,true)."\n");
+ fprintf($fp, "strftime result:
".$date->strftime($this->_format_out)."\n");
+ fclose($fp);
+
return $date->strftime($this->_format_out);
}
Output:
Horde_Date Object
(
[_year:protected] => 1900
[_month:protected] => 1
[_mday:protected] => 1
[_hour:protected] => 0
[_min:protected] => 0
[_sec:protected] => 0
[_timezone:protected] => Europe/Berlin
[_defaultFormat:protected] => Y-m-d H:i:s
[_formatCache:protected] => Array
(
)
)
Horde_Form_Type_monthdayyear Object
(
[_start_year] => 1900
[_end_year] => 2022
[_picker] => 1
[_format_in] => %Y-%m-%d
[_format_out] => %a, %d.%m.%Y
)
strftime result: Thu, 07.02.2036
-> It looks like Horde_Date->strftime() messes up.
State ⇒ Feedback
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Display glitch on anniversary dates in the year 1900/1901
Queue ⇒ Turba
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
when one creates a new contact with an anniversary day of 06.12.1900,
it is shown later on as 11.01.2037 in turba. Same for the year 1901.
Everything works correctly starting 1902.
Funnily kronolith shows the correct anniversary when using 1900.
Cheers,
Thomas