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

User1980's avatar

Time zone issue

Hi all,

I am having a strange time zone issue and cannot work it out.

In blade I output this: I am sending this date form a collection: $event->date

Without parsing it, it shows as: 2022-04-28 12:19:00

In MySQL it shows as: 2022-04-28 12:19:00

Which is correct

But I need to get(day,mont,year and hours + minutes):

d-m-Y h:m

I was hoping for this to work:

{{ \Carbon\Carbon::parse($event->date)->format('d-m-Y h:m')}}

But I am getting this output:

28-04-2022 12:04  (Different minutes)

I checked my time zone and it is set to:

'timezone' => 'Europe/Paris',

Any idea what is going on there please?

Thanks

0 likes
2 replies
tykus's avatar
tykus
Best Answer
Level 104

Not a timezone, but a date formatting issue - i for minutes; m is month number

{{ \Carbon\Carbon::parse($event->date)->format('d-m-Y h:i')}}
User1980's avatar

@tykus oh nooo...I forgot about the i ahahah :-)

Thank you so much!

Please or to participate in this conversation.