Permalink
Browse files

BUGFIX DatetimeField allows non-US style dates with an empty time com…

…ponent to be saved correctly
  • Loading branch information...
halkyon committed Feb 24, 2012
1 parent 58d4858 commit f4a758e500f3244e8b0c2d2c51f5e3124bc4a73c
Showing with 1 addition and 1 deletion.
  1. +1 −1 forms/DatetimeField.php
View
@@ -148,7 +148,7 @@ function setValue($val) {
unset($userValueObj);
} else {
// Validation happens later, so set the raw string in case Zend_Date doesn't accept it
- $this->value = sprintf($this->getConfig('datetimeorder'), $val['date'], $val['time']);
+ $this->value = trim(sprintf($this->getConfig('datetimeorder'), $val['date'], $val['time']));
}
if($userTz) date_default_timezone_set($dataTz);

0 comments on commit f4a758e

Please sign in to comment.