Skip to content

Commit

Permalink
Fix for #155 Use a plain DateTime object for the value of the {attach…
Browse files Browse the repository at this point in the history
…ment}_updated_at field.
  • Loading branch information
tabennett committed Oct 7, 2016
1 parent b93303a commit 7da8cf0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Attachment.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use Codesleeve\Stapler\ORM\StaplerableInterface;
use Codesleeve\Stapler\Factories\File as FileFactory;
use JsonSerializable;
use DateTime;

class Attachment implements AttachmentInterface, JsonSerializable
{
Expand Down Expand Up @@ -131,7 +132,7 @@ public function setUploadedFile($uploadedFile)
$this->instanceWrite('file_name', $this->uploadedFile->getFilename());
$this->instanceWrite('file_size', $this->uploadedFile->getSize());
$this->instanceWrite('content_type', $this->uploadedFile->getMimeType());
$this->instanceWrite('updated_at', date('Y-m-d H:i:s'));
$this->instanceWrite('updated_at', new DateTime);
$this->queueAllForWrite();
}

Expand Down

0 comments on commit 7da8cf0

Please sign in to comment.