src/util/Date.php
public static function offset($remote, $local = null, $now = null) {
        if ($local === null) {
            // Use the default timezone
            $local = date_default_timezone_get();
        }

        if (is_int($now)) {
            // Convert the timestamp into a string
            $now = date(\DateTime::RFC2822, $now);
        }

        // Create timezone objects
        $zone_remote = new \DateTimeZone($remote);
        $zone_local = new \DateTimeZone($local);

        // Create date objects from timezones
        $time_remote = new \DateTime($now, $zone_remote);
        $time_local = new \DateTime($now, $zone_local);

        // Find the offset
        $offset = $zone_remote->getOffset($time_remote) - $zone_local->getOffset($time_local);

        return $offset;
    }
public static function offset($remote, $local = null, $now = null) {
        if ($local === null) {
            // Use the default timezone
            $local = date_default_timezone_get();
        }

        if (is_int($now)) {
            // Convert the timestamp into a string
            $now = date(\DateTime::RFC2822, $now);
        }

        // Create timezone objects
        $zone_remote = new \DateTimeZone($remote);
        $zone_local = new \DateTimeZone($local);

        // Create date objects from timezones
        $time_remote = new \DateTime($now, $zone_remote);
        $time_local = new \DateTime($now, $zone_local);

        // Find the offset
        $offset = $zone_remote->getOffset($time_remote) - $zone_local->getOffset($time_local);

        return $offset;
    }
Returns the offset (in seconds) between two time zones. Use this to
display dates to users in different time zones.

$seconds = Date::offset('America/Chicago', 'GMT');

[!!] A list of time zones that PHP supports can be found at
<http://php.net/timezones>.

@param string $remote timezone that to find the offset of
@param string $local timezone used as the baseline
@param mixed $now UNIX timestamp or date string

@return integer