Commit 20e96cca by Philippe Gaultier

Fix DateTime cast

parent 264cf81e
......@@ -357,11 +357,11 @@ class Formatter extends Component
} catch (\Exception $e) {
return false;
}
$value = $date->format('U');
$value = (double)$date->format('U');
}
return $value;
} elseif ($value instanceof DateTime || $value instanceof \DateTimeInterface) {
return $value->format('U');
return (double)$value->format('U');
} else {
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