Commit 20e96cca by Philippe Gaultier

Fix DateTime cast

parent 264cf81e
...@@ -357,11 +357,11 @@ class Formatter extends Component ...@@ -357,11 +357,11 @@ class Formatter extends Component
} catch (\Exception $e) { } catch (\Exception $e) {
return false; return false;
} }
$value = $date->format('U'); $value = (double)$date->format('U');
} }
return $value; return $value;
} elseif ($value instanceof DateTime || $value instanceof \DateTimeInterface) { } elseif ($value instanceof DateTime || $value instanceof \DateTimeInterface) {
return $value->format('U'); return (double)$value->format('U');
} else { } else {
return (double)$value; return (double)$value;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment