I have a model with a bu_date "created_at" field. If I enter a date before 1902, I can't edit this row in admin generator because I have an error with this stack trace :
Impossible to parse date "1901-07-23 0:00" with format "yyyy-MM-dd HH:mm:ss".
# at ()
in SF_ROOT_DIR/lib/symfony/i18n/sfDateFormat.class.php line 178 ...
175. $numericalTime = @strtotime($time);
176. if ($numericalTime === false)
177. {
178. throw new sfException(sprintf('Impossible to parse date "%s" with format "%s".', $time, $pattern));
179. }
180. }
181. else
# at sfDateFormat->getDate('1901-07-23 0:00', null)
in SF_ROOT_DIR/lib/symfony/i18n/sfDateFormat.class.php line 211 ...
208. */
209. public function format($time, $pattern = 'F', $inputPattern = null, $charset = 'UTF-8')
210. {
211. $date = $this->getDate($time, $inputPattern);
212.
213. if (is_null($pattern))
214. {
# at sfDateFormat->format('1901-07-23 0:00', 'yyyy-MM-dd')
in SF_ROOT_DIR/lib/symfony/helper/FormHelper.php line 729 ...
726. }
727. else
728. {
729. $value = $dateFormat->format($value, $pattern);
730. }
731.
732. // register our javascripts and stylesheets
# at input_date_tag('history[tooked_place_from]', '1901-07-23 0:00', array('rich' => '1', 'calendar_button_img' => '/sf/sf_admin/images/date.png', 'format' => 'i'))
in SF_ROOT_DIR/lib/symfony/helper/ObjectHelper.php line 39 ...
36.
37. $value = _get_object_value($object, $method, $default_value, $param = 'Y-m-d G:i');
38.
39. return input_date_tag(_convert_method_to_name($method, $options), $value, $options);
40. }
41.
42. /**
# at object_input_date_tag(object('History'), 'getTookedPlaceFrom', array('rich' => '1', 'calendar_button_img' => '/sf/sf_admin/images/date.png', 'control_name' => 'history[tooked_place_from]', 'format' => 'i'))
in SF_ROOT_DIR/cache/backend/dev/modules/autoHistory/templates/_edit_form.php line 25 ...
22. 'calendar_button_img' => '/sf/sf_admin/images/date.png',
23. 'control_name' => 'history[tooked_place_from]',
24. 'format' => 'i',
25. )); echo $value ? $value : ' ' ?>
26. </div>
27. </div>
If I enter 1902-07-23, It works fine but with a year before 1902, I have this exception.