本文整理匯總了PHP中DateUtil::getLocalTimestamp方法的典型用法代碼示例。如果您正苦於以下問題:PHP DateUtil::getLocalTimestamp方法的具體用法?PHP DateUtil::getLocalTimestamp怎麽用?PHP DateUtil::getLocalTimestamp使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DateUtil
的用法示例。
在下文中一共展示了DateUtil::getLocalTimestamp方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: readData
/**
* @see Page::readData()
*/
public function readData()
{
parent::readData();
// get default values
if (!count($_POST)) {
if ($this->userSuspension->expires != 0) {
$expires = DateUtil::getLocalTimestamp($this->userSuspension->expires);
$this->expiresDay = gmdate('j', $expires);
$this->expiresMonth = gmdate('n', $expires);
$this->expiresYear = gmdate('Y', $expires);
$this->expiresHour = gmdate('G', $expires);
$this->expiresMinute = gmdate('i', $expires);
$this->expiresMinute -= $this->expiresMinute % 5;
}
}
}
示例2: readData
/**
* @see Page::readData()
*/
public function readData()
{
parent::readData();
// get predefined warnings
$this->warnings = Warning::getWarnings();
// get warning object
if ($this->userWarning->objectID != 0 && $this->userWarning->objectType != '') {
$this->object = Warning::getWarningObjectByID($this->userWarning->objectType, $this->userWarning->objectID);
}
// get default values
if (!count($_POST)) {
$this->warningID = $this->userWarning->warningID;
$this->title = $this->userWarning->title;
$this->points = $this->userWarning->points;
$this->reason = $this->userWarning->reason;
if ($this->userWarning->expires != 0) {
$expires = DateUtil::getLocalTimestamp($this->userWarning->expires);
$this->expiresDay = gmdate('j', $expires);
$this->expiresMonth = gmdate('n', $expires);
$this->expiresYear = gmdate('Y', $expires);
$this->expiresHour = gmdate('G', $expires);
$this->expiresMinute = gmdate('i', $expires);
$this->expiresMinute -= $this->expiresMinute % 5;
}
}
}