3v4l.org

run code in 300+ PHP versions simultaneously
<?php $theTime = time(); // specific date/time we're checking, in epoch seconds. $tz = new DateTimeZone('America/Los_Angeles'); $transition = $tz->getTransitions($theTime, $theTime); // only one array should be returned into $transition. Now get the data: $offset = $transition[0]['offset']; $abbr = $transition[0]['abbr'];

preferences:
35.91 ms | 402 KiB | 5 Q