#697: properly export NULL dates in "spreadsheet" format.

SVN:trunk[2662]
This commit is contained in:
Denis Flaven
2013-03-29 13:32:47 +00:00
parent 30b9afe165
commit c4942dd747

View File

@@ -1186,9 +1186,18 @@ abstract class cmdbAbstractObject extends CMDBObject implements iDisplay
$oFinalAttDef = $oAttDef->GetFinalAttDef();
if (get_class($oFinalAttDef) == 'AttributeDateTime')
{
$iDate = AttributeDateTime::GetAsUnixSeconds($oObj->Get($sAttCodeEx));
$aRow[] = '<td>'.date('Y-m-d', $iDate).'</td>';
$aRow[] = '<td>'.date('H:i:s', $iDate).'</td>';
$sDate = $oObj->Get($sAttCodeEx);
if ($sDate === null)
{
$aRow[] = '<td></td>';
$aRow[] = '<td></td>';
}
else
{
$iDate = AttributeDateTime::GetAsUnixSeconds($sDate);
$aRow[] = '<td>'.date('Y-m-d', $iDate).'</td>';
$aRow[] = '<td>'.date('H:i:s', $iDate).'</td>';
}
}
else
{