3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function getOffset($timezone) { return DateTime::createFromFormat('U',0)->setTimeZone(new DateTimeZone($timezone))->format('Z P'); } echo getOffset('America/New_York');
based on BBalM
Output for 5.6.0 - 7.3.0beta1
-18000 -05:00