From e471e9abef9a1e5227b69f20106825e03a5604dd Mon Sep 17 00:00:00 2001 From: Robert Wittman Date: Mon, 1 Oct 2018 20:53:56 -0700 Subject: [PATCH] Convert datetimes to ISO-8601 --- lib/Object/AbstractObject.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; }