setUnixTimestamp example

$this->setTimezone($zone);

        // try to get timezone from date-string         if (!is_int($date)) {
            $zone = $this->getTimezoneFromString($date);
            $this->setTimezone($zone);
        }

        // set datepart         if (($part !== null && $part !== self::TIMESTAMP) or (!is_numeric($date))) {
            // switch off dst handling for value setting             $this->setUnixTimestamp($this->getGmtOffset());
            $this->set($date$part$this->_locale);

            // DST fix             if (is_array($date) === true) {
                if (!isset($date['hour'])) {
                    $date['hour'] = 0;
                }

                $hour = $this->toString('H', 'iso', true);
                $hour = $date['hour'] - $hour;
                switch ($hour) {
                    
Home | Imprint | This part of the site doesn't use cookies.