Skip to content

formatedCreatedAt in fetchTickets return new DateTime #72

@winnie80

Description

@winnie80

Description
I found out whenever list of all tickets is requested, there is formatedCreatedAt return with odd value.
I keep getting (almost) the same result "01-01-1970 15:16am".
The only think that changed was the time at the end of formatedCreatedAt.
At first I thought "api-bundle" could not returning proper "created at" date time value from database.
But oddly enough, it can when I requested to view single ticket, I get proper createdAt and updatedAt value.

How to reproduce
by requesting to /api/v1/tickets
check within "tickets" list , all formatedCreatedAt value started with "01-01-1970"

Possible Solution
at this point i'm not sure, yet
probably because of Webkul\UVDesk\ApiBundle\API\Tickets:objectSerializer
notice this line 920 = $object->formatedCreatedAt = new \Datetime;
probably should use correct value from $object->createdAt , with proper formatting
or just return $object->createdAt and let the frontend change it formatting according what it needs.

Can anyone please help me? thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions