Skip to content
Snippets Groups Projects
Commit 084c9748 authored by Peter Rotich's avatar Peter Rotich
Browse files

Merge pull request #1036 from greezybacon/issue/632

i18n: Format time drop down via config time format

Peter Rotich <peter@osticket.com>
parents fd435df1 f57ed71e
No related branches found
No related tags found
No related merge requests found
......@@ -103,6 +103,8 @@ class Misc {
}
function timeDropdown($hr=null, $min =null,$name='time') {
global $cfg;
$hr =is_null($hr)?0:$hr;
$min =is_null($min)?0:$min;
......@@ -129,7 +131,8 @@ class Misc {
$sel=($hr==$i && $min==$minute)?'selected="selected"':'';
$_minute=str_pad($minute, 2, '0',STR_PAD_LEFT);
$_hour=str_pad($i, 2, '0',STR_PAD_LEFT);
echo sprintf('<option value="%s:%s" %s>%s:%s</option>',$_hour,$_minute,$sel,$_hour,$_minute);
$disp = date($cfg->getTimeFormat(), $i*3600 + $minute*60);
echo sprintf('<option value="%s:%s" %s>%s</option>',$_hour,$_minute,$sel,$disp);
}
}
echo '</select>';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment