Normalize DateTime values as ISO 8601 strings
This commit is contained in:
parent
d3602e075b
commit
dd00409e85
1 changed files with 1 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ class ModelToElasticaAutoTransformer implements ModelToElasticaTransformerInterf
|
|||
{
|
||||
$normalizeValue = function(&$v) {
|
||||
if ($v instanceof \DateTime) {
|
||||
$v = (int) $v->format('U');
|
||||
$v = $v->format('v');
|
||||
} elseif (!is_scalar($v) && !is_null($v)) {
|
||||
$v = (string) $v;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue