Carbon interprets P1M in ISO 8601 as 1 minute instead of 1 month
I am using Laravel 11 and trying to work with ISO 8601 intervals using Carbon. However, I encountered an issue where Carbon interprets P1M as 1 minute (60 seconds) instead of 1 month. This is causing problems with my time calculations.
Error on Carbon::createFromFormat function
I have a string as $dateString whose content is “2024-04-29-11-11-12”
I will convert it to “2024-04-29 11:11:12” with the command Carbon::createFromFormat(‘Y-m-d-H-i-s’,$dateString);