uvdesk / api-bundle

API Integration for UVdesk Community Helpdesk System.
MIT License
17 stars 14 forks source link

formatedCreatedAt in fetchTickets return new DateTime #72

Open winnie80 opened 1 year ago

winnie80 commented 1 year ago

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

komal-sh-27 commented 1 year ago

@winnie80

We have checked this issue and we will tried to fix this issue. It will be reflected in the future release.

Thanks for your time and patience!!!

Thanks and Regards Uvdesk Team