"fixed date-time widget to correctly write seconds, eg. if output format is \"Y-m-d H:i:s\""

This commit is contained in:
Ralf Becker 2009-05-22 07:05:51 +00:00
parent e117b8108f
commit a63bba2e4d

View File

@ -627,7 +627,7 @@ class date_widget
{
for ($n = 0,$str = ''; $n < strlen($data_format); ++$n)
{
if (strpos('YmdHi',$c = $data_format[$n]) !== false)
if (strpos('YmdHis',$c = $data_format[$n]) !== false)
{
$str .= sprintf($c=='Y'?'%04d':'%02d',$value[$c]);
}