From 738b102fd075ddb544d47464a7cc4ba382bca782 Mon Sep 17 00:00:00 2001 From: Michal Zukowski Date: Wed, 25 Nov 2015 22:17:29 +0100 Subject: [PATCH] Bugfix invalid datetime format --- src/Entity/Classroom.php | 2 +- tests/Entity/ClassroomTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Entity/Classroom.php b/src/Entity/Classroom.php index fa1f406..5ac2e83 100644 --- a/src/Entity/Classroom.php +++ b/src/Entity/Classroom.php @@ -28,7 +28,7 @@ private function __construct($title, $presenterEmail, \DateTime $startTime) { $this->title = (string)$title; $this->presenterEmail = (string)$presenterEmail; - $this->startTime = $startTime->format('d/m/Y H:i:s'); + $this->startTime = $startTime->format('m/d/Y H:i:s'); } /** diff --git a/tests/Entity/ClassroomTest.php b/tests/Entity/ClassroomTest.php index 8a7c294..db395ae 100644 --- a/tests/Entity/ClassroomTest.php +++ b/tests/Entity/ClassroomTest.php @@ -11,7 +11,7 @@ class ClassroomTest extends \PHPUnit_Framework_TestCase /** @var array */ private $expected = [ 'title' => 'Title', - 'start_time' => '30/12/2015 12:30:40', + 'start_time' => '12/30/2015 12:30:40', 'presenter_email' => 'mike@test.com', 'language_culture_name' => '', 'extend_duration' => '',