if ($date === null
) { if ($part === null
) { $date =
time();
} else if ($part !== self::TIMESTAMP
) { $date = self::
now($locale);
$date =
$date->
get($part);
} } if (parent::
$_defaultOffset != 0
) { $date =
$this->
_getTime(parent::
$_defaultOffset);
} // set the timezone and offset for $this
$zone = @
date_default_timezone_get();
$this->
setTimezone($zone);
// try to get timezone from date-string
if (!
is_int($date)) { $zone =
$this->
getTimezoneFromString($date);
$this->
setTimezone($zone);
}