10000 [Serializer] DateTimeNormalizer U or U.u format as int/float · Issue #53055 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[Serializer] DateTimeNormalizer U or U.u format as int/float #53055
Closed
@norkunas

Description

@norkunas

Description

Currently DateTimeNormalizer always uses datetime->format($format) so it's logical when expecting human readable dates to get as strings, but one could expect that when providing "U" format to get an integer or "U.u" to get float.

In meilisearch/meilisearch-symfony#304 we have a need for this, because meilisearch api expects dates to be indexed as integers.

So I think this could be a good addition, but of course for BC reasons we'd need to add additional context key to enable this.

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0