3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php //target time zone $target_time_zone = new DateTimeZone('America/Los_Angeles'); //find kolkata time $date_time = new DateTime('now', $target_time_zone); //get the exact GMT format echo 'GMT '. str_replace(":00","",$date_time->format('O'));
Output for 5.2.0 - 7.2.0
GMT -0700
Output for 5.0.0 - 5.1.6
Fatal error: Class 'DateTimeZone' not found in /in/GE8IT on line 4
Process exited with code 255.
Output for 4.3.2 - 4.4.9
Fatal error: Cannot instantiate non-existent class: datetimezone in /in/GE8IT on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Cannot instantiate non-existent class: datetimezone in /in/GE8IT on line 4