mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 19:34:27 +02:00
fix handling of %I with mysql timestamps
Thanks to Danilo Buerger
This commit is contained in:
@@ -31,7 +31,7 @@ require_once $smarty->_get_plugin_filepath('shared','make_timestamp');
|
||||
function smarty_modifier_date_format($string, $format="%b %e, %Y", $default_date=null)
|
||||
{
|
||||
if (substr(PHP_OS,0,3) == 'WIN') {
|
||||
$hours = strftime('%I', smarty_make_time_stamp($string));
|
||||
$hours = strftime('%I', smarty_make_timestamp($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');
|
||||
|
Reference in New Issue
Block a user