Comment by Implicated

Comment by Implicated 7 days ago

1 reply

Given the tone and wording of your comments I hesitated to even reply but, alas, my love for PHP was strong enough to push me through.

You are, actually, doing it wrong.

https://carbon.nesbot.com/docs/

I forgive you, being that you're clearly not familiar with modern PHP and it's incredibly mature and diverse library ecosystem and first class package manager.

> However, it seems it is just a search stupidity ...

You're searching a list of thirty (30) functions. I don't even know how you found that list of functions but, surely, you don't think that's an exhaustive place to search for a specific date format? Surely you're not being purposely obtuse. (As you likely found, if you just plop your search term in the search at the top of the PHP website you would have found the DateTime class and how to handle these various formats)

Anyway - for anyone who may happen across this odd chain of comments, dealing with dates in PHP is an actual breeze using Carbon\Carbon.

tyingq 7 days ago

Pretty sure that doesn't handle the 'Z' timezone offset, as I saw the same with various PHP built-ins. Some ignore offsets, some don't...but handle only specific formats and not others, including the Z. So you still need some kind of wrapper.