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

Zend_Date_DateObject::setUnixTimestamp ( timestamp = null ) [protected]

Set this object to have a new UNIX timestamp.

string | integer$timestampOPTIONAL timestamp; defaults to local time using time()
string|integer old timestamp

Definition at line 78 of file DateObject.php.

Referenced by Zend_Date::__construct(), Zend_Date::_assign(), and Zend_Date::_timestamp().

        $old = $this->_unixTimestamp;

        if (is_numeric($timestamp)) {
            $this->_unixTimestamp = $timestamp;
        } else if ($timestamp === null) {
            $this->_unixTimestamp = time();
        } else {
            require_once 'Zend/Date/Exception.php';
            throw new Zend_Date_Exception('\'' . $timestamp . '\' is not a valid UNIX timestamp', 0, null, $timestamp);

        return $old;

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index