Parcourir la source

Revert back to using gmmktime and use day 15 instead of 1 to avoid edge case

Jonathan H. Wage il y a 14 ans
Parent
commit
611dbf1bfe

+ 1 - 1
src/Symfony/Component/Form/Extension/Core/ChoiceList/MonthChoiceList.php

@@ -46,7 +46,7 @@ class MonthChoiceList extends PaddedChoiceList
 
             foreach ($this->choices as $choice => $value) {
                 // It's important to specify the first day of the month here!
-                $this->choices[$choice] = $this->formatter->format(mktime(0, 0, 0, $value, 1));
+                $this->choices[$choice] = $this->formatter->format(gmmktime(0, 0, 0, $value, 15));
             }
 
             // I'd like to clone the formatter above, but then we get a