6.0.0-alpha12
6/8/25

[#10759] Wrong horde strftime on Date.php and Kronolith
Summary Wrong horde strftime on Date.php and Kronolith
Queue Kronolith
Queue Version 3.0.11
Type Bug
State Not A Bug
Priority 2. Medium
Owners
Requester js (at) cvut (dot) cz
Created 11/14/2011 (4955 days ago)
Due
Updated 11/30/2011 (4939 days ago)
Assigned
Resolved 11/30/2011 (4939 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
11/30/2011 09:25:50 PM js (at) cvut (dot) cz Comment #7
New Attachment: bug.png Download
Reply to this comment
Stop spreading FUD. Did you actually take a look at my commit? It's 
a unit test for what you say is supposed to be broken in Horde_Date 
and it passes just fine. If you think Horde is broken then provide a 
unit test that demonstrates that.
  Sorry, don't take it personaly. But I'm confused. I will not write 
any testunit. I just report real bug. You don't handle in strftime() 
%-d and %-m, which is on all czech locales, not broken locales, not 
edit locales... PHP strftime() works correctly. See result in my 
attachment. That's all what I say, take it or leave it.  And don't be 
upset :-)

  Regards
  Jiri
11/30/2011 08:18:31 PM Jan Schneider Comment #6 Reply to this comment
Stop spreading FUD. Did you actually take a look at my commit? It's a 
unit test for what you say is supposed to be broken in Horde_Date and 
it passes just fine. If you think Horde is broken then provide a unit 
test that demonstrates that.
11/30/2011 08:11:25 PM js (at) cvut (dot) cz Comment #5 Reply to this comment
Horde_Date isn't even using it's own strftime() implementation with 
this format string, because it contains unsupported characters.
  This characters is on ALL systems in Czech. And they are working in 
all programming languages, only Horde has problems. What's wrong witch 
you guys? You want to send this project to bottom? When people sending 
serious bugs you take it as joke? :-(
11/30/2011 06:53:57 PM Jan Schneider Comment #4
State ⇒ Not A Bug
Patch ⇒ No
Reply to this comment
Horde_Date isn't even using it's own strftime() implementation with 
this format string, because it contains unsupported characters.
11/30/2011 06:53:04 PM Git Commit Comment #3 Reply to this comment
Changes have been made in Git for this ticket:

Add unit test for bug #10759.

  1 files changed, 17 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/38f4fb25724f483bc7c296231c0192f1b867192b
11/14/2011 12:19:09 PM js (at) cvut (dot) cz Comment #2 Reply to this comment
This bug appears not only in Date.php, but in lib/Kronlotih.php too.
When adding new event, same error caused by own replacement of strftime.
That? because your are not using system wide strftime.
It? shame do same mistake twice - should be called by Date.php and 
Horde_Date ;-)

11/14/2011 12:12:56 PM js (at) cvut (dot) cz Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ Wrong horde strftime on Date.php and Kronolith
Queue ⇒ Kronolith
Milestone ⇒
Patch ⇒ Yes
State ⇒ Unconfirmed
Reply to this comment
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 :-)

Saved Queries