I AM LISTENING TO
|

WHAT I LIKE

Free IP geolocation databases WordPress Admin + Plugin Development + Less + Bootstrap = Awesome
API     Development     Javascript     PHP    

JSON Date (.NET) to PHP timestamp



16. April 2014

The JSON spec allows integers, fractional numbers, strings, arrays, but when it comes to dates things are handled differently. There really is no date format in the JSON spec. Would be nice if every JSON date output would conform to ISO8601 🙂

Some of these can easily be converted to a PHP timestamp using strtotime(), others require some more magic.

Here is a way to transform the .NET variant, something that has been haunting me in a current project 😉

Due to the wide usage of JSON as an exchange format, I really hope we will see a spec update in the future 🙂




Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz