Fix for task archived_at in API
This commit is contained in:
parent
255f8baaa9
commit
1cb9c15925
1 changed files with 7 additions and 1 deletions
|
|
@ -37,7 +37,13 @@ class EntityTransformer extends TransformerAbstract
|
|||
|
||||
protected function getTimestamp($date)
|
||||
{
|
||||
return method_exists($date, 'getTimestamp') ? $date->getTimestamp() : null;
|
||||
if (method_exists($date, 'getTimestamp')) {
|
||||
return $date->getTimestamp();
|
||||
} elseif (is_string($date)) {
|
||||
return strtotime($date);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public function getDefaultIncludes()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue