try this 

```php
$this->createdAt = new DateTime(date('Y-m-d H:i:s', $timestamp));
```