cvs: smarty / NEWS /libs/plugins modifier.date_format.php

"boots" <[email protected]> Wed, 10 Jan 2007 18:12:11 -0000
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsboots1168452731@cvsserver>
boots		Wed Jan 10 18:12:11 2007 UTC

  Modified files:              
    /smarty	NEWS 
    /smarty/libs/plugins	modifier.date_format.php 
  Log:
  fix handling of %I with mysql timestamps
  
  Thanks to Danilo Buerger
  
http://cvs.php.net/viewvc.cgi/smarty/NEWS?r1=1.547&r2=1.548&diff_format=u
Index: smarty/NEWS
diff -u smarty/NEWS:1.547 smarty/NEWS:1.548
--- smarty/NEWS:1.547	Wed Jan 10 16:28:38 2007
+++ smarty/NEWS	Wed Jan 10 18:12:11 2007
@@ -1,3 +1,5 @@
+- fix handling of %I with mysql timestamps in the date_format modifier
+  (Danilo Buerger, boots)
 - update smarty_core_write_file() to better recognize Windows (boots)
 - emulate %R in the date_format modifier on Windows (Danilo Buerger, boots)
 
http://cvs.php.net/viewvc.cgi/smarty/libs/plugins/modifier.date_format.php?r1=1.16&r2=1.17&diff_format=u
Index: smarty/libs/plugins/modifier.date_format.php
diff -u smarty/libs/plugins/modifier.date_format.php:1.16 smarty/libs/plugins/modifier.date_format.php:1.17
--- smarty/libs/plugins/modifier.date_format.php:1.16	Wed Jan 10 16:25:23 2007
+++ smarty/libs/plugins/modifier.date_format.php	Wed Jan 10 18:12:11 2007
@@ -31,7 +31,7 @@
 function smarty_modifier_date_format($string, $format="%b %e, %Y", $default_date=null)
 {
     if (substr(PHP_OS,0,3) == 'WIN') {
-        $hours = strftime('%I', $string);
+        $hours = strftime('%I', smarty_make_time_stamp($string));
         $short_hours = ( $hours < 10 ) ? substr( $hours, -1) : $hours; 
         $_win_from = array ('%e',  '%T',       '%D',        '%l',           '%R');
         $_win_to   = array ('%#d', '%H:%M:%S', '%m/%d/%y',  $short_hours,   '%H:%M');

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php