[Tickets #10759] Wrong horde strftime on Date.php and Kronolith

bugs at horde.org bugs at horde.org
Mon Nov 14 12:12:57 UTC 2011


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/10759
------------------------------------------------------------------------------
  Ticket             | 10759
  Created By         | js at cvut.cz
  Summary            | Wrong horde strftime on Date.php and Kronolith
  Queue              | Kronolith
  Version            | 3.0.11
  Type               | Bug
  State              | Unconfirmed
  Priority           | 2. Medium
  Milestone          |
  Patch              | 1
  Owners             |
------------------------------------------------------------------------------


js at cvut.cz (2011-11-14 12:12) wrote:

Horde in czech has serious problems with own written functions in  
Date.php class Horde_Date.
Functions strftime and _strftime is unable to handle czech locale  
%-d.%-m.%Y, this is not locale problem!
All czech distros uses this, try this:

setlocale(LC_TIME,'cs_CZ.UTF8');
$f =  nl_langinfo(D_FMT);
echo $f." = ".strftime($f,mktime(1,1,1,3,3,1976)). "\n";

Internal strftime function of PHP works fine, but user defined  
function of Horde not. Why you preffer own??!
It's realy not bug in locale as described in #10435

Working pactch is add this line to Nls.php:
self::$_cache['nl_info'][$item] =  
preg_replace('/%-([dm])/','%$1',self::$_cache['nl_info'][$item]);
just before return in getLangInfo($item) - but that not nice patch :-)






More information about the bugs mailing list