mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-03-11 21:50:15 +01:00
fix formatting for timestamp and quiten error_log
This commit is contained in:
parent
c9a6753b4c
commit
c9f45a82ff
@ -217,10 +217,10 @@ class egw_customfields implements IteratorAggregate
|
|||||||
{
|
{
|
||||||
$format = $field['len'] ? $field['len'] : ($field['type'] == 'date' ? 'Y-m-d' : 'Y-m-d H:i:s');
|
$format = $field['len'] ? $field['len'] : ($field['type'] == 'date' ? 'Y-m-d' : 'Y-m-d H:i:s');
|
||||||
$formats = preg_split('/[\\/. :-]/',$format);
|
$formats = preg_split('/[\\/. :-]/',$format);
|
||||||
$values = preg_split('/[\\/. :-]/',$value);
|
$values = preg_split('/[\\/. :-]/', is_numeric($value) ? egw_time::to($value, $format) : $value);
|
||||||
if (count($formats) != count($values))
|
if (count($formats) != count($values))
|
||||||
{
|
{
|
||||||
error_log(__METHOD__."(".array2string($field).", value='$value') format='$format', formats=".array2string($formats).", values=".array2string($values));
|
//error_log(__METHOD__."(".array2string($field).", value='$value') format='$format', formats=".array2string($formats).", values=".array2string($values));
|
||||||
$values = array_slice($values, 0, count($formats));
|
$values = array_slice($values, 0, count($formats));
|
||||||
}
|
}
|
||||||
$date = array_combine($formats, $values);
|
$date = array_combine($formats, $values);
|
||||||
|
Loading…
Reference in New Issue
Block a user