6.0.0-RC7
6/16/26

[#11836] Display glitch on anniversary dates in the year 1900/1901
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/9/12 (4937 days ago)
Due
Updated 1/27/16 (3793 days ago)
Assigned 12/13/12 (4933 days ago)
Resolved 1/27/16 (3793 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
585 Jan Schneider State ⇒ Not Reproducible
 
3910 Jan Schneider Comment #8 Reply to this comment
Any progress here?
69 Jan Schneider Comment #7 Reply to this comment
I still cannot reproduce.
58 Thomas Jarosch Comment #6 Reply to this comment
If it's related to the %a specifier, is this fixed now with the 
fixes for bug 11831?
Unfortunately this report is still valid.

126 Jan Schneider Comment #5 Reply to this comment
If it's related to the %a specifier, is this fixed now with the fixes 
for bug 11831?
361 Thomas Jarosch Comment #4 Reply to this comment
It's triggered by the "%a" format specifier again.
If I remove that from the "date_format" pref, it renders fine.

551 Thomas Jarosch Comment #3 Reply to this comment
I've added this debug code to the Form renderer:

--- 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.

264 Michael Rubinsky Comment #2
State ⇒ Feedback
Reply to this comment
Cannot reproduce.
812 Thomas Jarosch Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Display glitch on anniversary dates in the year 1900/1901
Queue ⇒ Turba
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
Hi,

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

Saved Queries