0

I have a string in this form: 2023-08-25T11:52:00+01:30 How can I make local PHP datetime object with proper timezone set? I am using Carbon, but it does not recognize timezone at the end and simply removes it.

Carbon::create('2023-08-25T11:52:00+01:30');

I also try to use createFromFormat()

Carbon::createFromFormat('Y-m-d\TH:i:sP', '2023-08-25T11:52:00+01:30');

but it also does not work.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Čamo
  • 3,863
  • 13
  • 62
  • 114

0 Answers0