Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

eskiesirius's avatar

Wrong Date and Time when fetch

I already set the timezone of my laravel app to 'Asia/Manila' so when i tried to add a new record, the date and time is correct in the database and if i use dd() it displays the correct date and time but when i use axios to fetch the record.. it returns different date and time..

0 likes
4 replies
Snapey's avatar

in the front end you would probably receive the date in UTC and initialise a date object or moment.js and then display it in the correct timezone

Please or to participate in this conversation.