3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function ConvertGMTToLocalTimezone($gmttime,$timezoneRequired) { $date = new \DateTime(date('d-m-Y h:i:s', time() ) ); $date->setTimeZone(new \DateTimezone($timezoneRequired)); return $date->format('D, d M Y H:i:s O'); } $ISTtime=ConvertGMTToLocalTimezone('Tue, 17 Dec 2013 07:23:56 +0000','Asia/Calcutta'); echo $ISTtime;
based on dC7hg
Output for 5.6.0 - 5.6.30, hhvm-3.21.3, 7.1.0 - 7.1.2, 7.1.4 - 7.3.0alpha1
Wed, 30 May 2018 08:02:31 +0530
Output for hhvm-3.18.5, hhvm-3.22.0, 7.1.3
Wed, 30 May 2018 08:02:32 +0530