I'm trying to convert time of a time zone to time for another time zone as provided in How can I easily convert dates from UTC via PHP? as provided below.
$dateTime = new DateTime("2009-04-01 15:36:13");
$dateTime->setTimezone(new DateTimeZone('Asia/Kolkata'));
echo $dateTime->format("Y-m-d H:i:s");
While testing at localhost, this seems to work fine but on my development server, the page throws a 500 internal server error (if called through ajax) or the page simply breaks from that line of code onwards.
Both localhost and my development server is using PHP 5.3.5.
Is there any reason why this would not be working?