"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:04:55 +00:00
parent 9ebd2fab61
commit 53a8d50bb0

View File

@ -626,7 +626,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]);
}