Logo Search packages:      
Sourcecode: zendframework version File versions  Download package

Zend_Date_DateObject::getGmtOffset (  )

Return the offset to GMT of $this object's timezone. The offset to GMT is initially set when the object is instantiated using the currently, in effect, default timezone for PHP functions.

integer seconds difference between GMT timezone and timezone when object was instantiated

Definition at line 1045 of file DateObject.php.

Referenced by Zend_Date::__construct(), and Zend_Date::getDate().

        $date   = $this->getDateParts($this->getUnixTimestamp(), true);
        $zone   = @date_default_timezone_get();
        $result = @date_default_timezone_set($this->_timezone);
        if ($result === true) {
            $offset = $this->mktime($date['hours'], $date['minutes'], $date['seconds'],
                                    $date['mon'], $date['mday'], $date['year'], false)
                    - $this->mktime($date['hours'], $date['minutes'], $date['seconds'],
                                    $date['mon'], $date['mday'], $date['year'], true);

        return $offset;

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index