- date_default_timezone_set: documentation ( source)
- date: documentation ( source)
- json_encode: documentation ( source)
<?php
date_default_timezone_set('America/New_York');
$date = new DateTime("2012-07-05 16:43:21", new DateTimeZone('Europe/Paris'));
echo date("Y-m-d h:iA", $date->format('U'));
echo json_encode($date->format());