/**
 * Get the time offset from GMT in hours or seconds.
 *
 * @param   boolean  $hours  True to return the value in hours.
 *
 * @return  float  The time offset from GMT either in hours or in seconds.
 *
 * @since   1.7.0
 */
public function getOffsetFromGmt($hours = false)
{
    return (float) $hours ? $this->tz->getOffset($this) / 3600 : $this->tz->getOffset($this);
}