Is there a way to create a JSON object in PHP that contains a javascript date object? Does json_encode automatically convert PHP\'s DateTime<
date
json_encode
DateTime<
You could pass the date / time as a UNIX timestamp which is an integer, a natively supported data type in JSON. DateTime in PHP has a "getTimestamp()" function which will give you that value.