Browse Source

Fixes #763.

tags/2.0.0-beta
Qiang Xue 11 years ago
parent
commit
53d25e9275
  1. 2
      framework/yii/base/Formatter.php

2
framework/yii/base/Formatter.php

@ -314,7 +314,7 @@ class Formatter extends Component
protected function normalizeDatetimeValue($value)
{
if (is_string($value)) {
return is_numeric($value) ? (int)$value : strtotime($value);
return is_numeric($value) || $value === '' ? (int)$value : strtotime($value);
} elseif ($value instanceof DateTime) {
return $value->getTimestamp();
} else {

Loading…
Cancel
Save