diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php index ad1590edf6bb..e40114abe894 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php @@ -123,7 +123,7 @@ private static function formatFileSize($path) private static function isExpired($date) { - $date = \DateTime::createFromFormat('m/Y', $date); + $date = \DateTime::createFromFormat('d/m/Y', '01/'.$date); return false !== $date && new \DateTime() > $date->modify('last day of this month 23:59:59'); } diff --git a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php index 96d60c003fbb..673bf5c5fdab 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/ConfigDataCollector.php @@ -81,8 +81,8 @@ public function collect(Request $request, Response $response, \Exception $except $this->data['symfony_state'] = $this->determineSymfonyState(); $this->data['symfony_minor_version'] = sprintf('%s.%s', Kernel::MAJOR_VERSION, Kernel::MINOR_VERSION); - $eom = \DateTime::createFromFormat('m/Y', Kernel::END_OF_MAINTENANCE); - $eol = \DateTime::createFromFormat('m/Y', Kernel::END_OF_LIFE); + $eom = \DateTime::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_MAINTENANCE); + $eol = \DateTime::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_LIFE); $this->data['symfony_eom'] = $eom->format('F Y'); $this->data['symfony_eol'] = $eol->format('F Y'); } @@ -314,8 +314,8 @@ public function getName() private function determineSymfonyState() { $now = new \DateTime(); - $eom = \DateTime::createFromFormat('m/Y', Kernel::END_OF_MAINTENANCE)->modify('last day of this month'); - $eol = \DateTime::createFromFormat('m/Y', Kernel::END_OF_LIFE)->modify('last day of this month'); + $eom = \DateTime::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_MAINTENANCE)->modify('last day of this month'); + $eol = \DateTime::createFromFormat('d/m/Y', '01/'.Kernel::END_OF_LIFE)->modify('last day of this month'); if ($now > $eol) { $versionState = 'eol';