mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
BUGFIX DatetimeField allows non-US style dates with an empty time component to be saved correctly
This commit is contained in:
parent
58d48583a9
commit
f4a758e500
@ -148,7 +148,7 @@ class DatetimeField extends FormField {
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user