本文整理汇总了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;
}
}
}