Skip to content

Commit

Permalink
Convert datetimes to ISO-8601
Browse files Browse the repository at this point in the history
  • Loading branch information
robwittman committed Oct 2, 2018
1 parent 02f64e8 commit e471e9a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Object/AbstractObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e471e9a

Please sign in to comment.