diff --git a/application/modules/admin/controllers/CmsController.php b/application/modules/admin/controllers/CmsController.php index 9adcd8650d0cbfe6fda5f87d6771913da394265f..3c7e4a3cfd9d00d0a3003cae53efbe1a8b1a582b 100644 --- a/application/modules/admin/controllers/CmsController.php +++ b/application/modules/admin/controllers/CmsController.php @@ -409,7 +409,7 @@ class Admin_CmsController extends ZendAfi_Controller_Action { private function _toDate($str) { if ($str!==null && $str!=='') { $date = new Zend_Date($str, null, Zend_Registry::get('locale')); - return $date->getIso(); + return $date->toString('YYYY-MM-dd HH:mm'); } return null; diff --git a/tests/application/modules/admin/controllers/CmsControllerTest.php b/tests/application/modules/admin/controllers/CmsControllerTest.php index 15204cc975e11c6c29bc9ba043a92564e8a16882..576bfc6cc01b51c363be5187c1b921020e717c41 100644 --- a/tests/application/modules/admin/controllers/CmsControllerTest.php +++ b/tests/application/modules/admin/controllers/CmsControllerTest.php @@ -736,8 +736,8 @@ class CmsControllerArticleConcertEditActionPostTest extends CmsControllerTestCas 'id_cat' => 34, 'debut' => '01/03/2011', 'fin' => '26/03/2011', - 'events_debut' => '02/03/2011', - 'events_fin' => '05/03/2011', + 'events_debut' => '02/03/2011 08:35', + 'events_fin' => '05/03/2011 10:42', 'ckeditor_contenu' => 'Ici: <img src="../../images/bonlieu.jpg" />', 'ckeditor_description' => 'Affiche: <img src="http://localhost' . BASE_URL . '/images/concert.jpg" />', 'id_lieu' => 3, @@ -790,14 +790,14 @@ class CmsControllerArticleConcertEditActionPostTest extends CmsControllerTestCas /** @test */ - function eventDebutShouldBe2011_03_02() { - $this->assertContains('2011-03-02', $this->concert->getEventsDebut()); + function eventDebutShouldBe2011_03_02_at_08_35() { + $this->assertContains('2011-03-02 08:35', $this->concert->getEventsDebut()); } /** @test */ - function eventFinShouldBe2011_03_05() { - $this->assertContains('2011-03-05', $this->concert->getEventsFin()); + function eventFinShouldBe2011_03_05_at_10_42() { + $this->assertContains('2011-03-05 10:42', $this->concert->getEventsFin()); }