diff --git a/lib/Object/AbstractObject.php b/lib/Object/AbstractObject.php index 81aef1f..d3e4c31 100644 --- a/lib/Object/AbstractObject.php +++ b/lib/Object/AbstractObject.php @@ -203,7 +203,9 @@ function ($obj) { }, $value ); } elseif (is_a($value, AbstractObject::class)) { - $value = $value->exportData(); + $results[$field] = $value->exportData(); + } elseif (is_a($value, \DateTime::class)) { + $result[$field] = $value->format(\DateTime::ATOM); } else { $results[$field] = $value; }