Skip to content
Advertisement

PHP Datetime Formatting

I am using an external API to fetch data on posts and its publish date format seems unusual:

“created_at” : “Mon Jul 27 14:30:53 -0500 2020”

I can pretty know when it was published but what exactly does the -0500 mean?

Since this is an external API I don’t know what how the date was formatted.

Advertisement

Answer

It shows the difference between your time and UTC (universal / international standard time). So in your case, you are 5 hours behind (less than) the UTC time.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement