/** * Return the CURRENT offset from UTC for this station as provided by the * API. * * @return integer The current offset from UTC. * @since 1.2.0 */ public function getOffset() { if (!empty($this->_properties['tz']) && is_numeric($this->_properties['tz'])) { return ($this->tz < 0 ? '-' : '') . gmdate('H:i', floor(abs($this->tz) * 60 * 60)); } elseif (!empty($this->_properties['tz'])) { try { $d = new Horde_Date(time(), 'UTC'); $d->setTimezone($this->tz); return $d->tzOffset(); } catch (Horde_Date_Exception $e) { } } return false; }