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

yijani's avatar

Carbon returning the wrong date

Hi guys, I'm using diffForHumans from Carbon that was returned from my model and I created a new record on the table with the now(), the date is right but when I see the results from diffForHumans it's like 3 hours ago.

0 likes
2 replies
Cronix's avatar
Cronix
Best Answer
Level 67

Do you have the timezone set correctly in laravel?

1 like
yijani's avatar

You are right, that was the problem. Thank you very much.

1 like

Please or to participate in this conversation.