本文整理汇总了PHP中ilDateTime::getUnixTime方法的典型用法代码示例。如果您正苦于以下问题:PHP ilDateTime::getUnixTime方法的具体用法?PHP ilDateTime::getUnixTime怎么用?PHP ilDateTime::getUnixTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilDateTime
的用法示例。
在下文中一共展示了ilDateTime::getUnixTime方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getEndDate
/**
* Returns meeting end date
* @return ilDateTime
*/
public function getEndDate()
{
$end_date = new ilDateTime($this->start_date->getUnixTime(), IL_CAL_UNIX);
$end_date->increment(ilDateTime::HOUR, $this->duration["hours"]);
$end_date->increment(ilDateTime::MINUTE, $this->duration["minutes"]);
return $end_date;
}
示例2: _lookupAppointment
/**
* lookup appointment
*
* @access public
* @param int obj_id
* @static
*/
public static function _lookupAppointment($a_obj_id)
{
global $ilDB;
$query = "SELECT * FROM event_appointment " . "WHERE event_id = " . $ilDB->quote($a_obj_id, 'integer') . " ";
$res = $ilDB->query($query);
while ($row = $res->fetchRow(DB_FETCHMODE_OBJECT)) {
$info['fullday'] = $row->fulltime;
$date = new ilDateTime($row->e_start, IL_CAL_DATETIME, 'UTC');
$info['start'] = $date->getUnixTime();
$date = new ilDateTime($row->e_end, IL_CAL_DATETIME, 'UTC');
$info['end'] = $date->getUnixTime();
return $info;
}
return array();
}
示例3: __calculateAccessEnddate
private function __calculateAccessEnddate()
{
include_once 'Services/Calendar/classes/class.ilDateTime.php';
$tmp_ts = new ilDateTime($this->getAccessStartdate(), IL_CAL_DATETIME);
$start_date = $tmp_ts->getUnixTime();
$duration = $this->getDuration();
$startDateYear = date("Y", $start_date);
$startDateMonth = date("m", $start_date);
$startDateDay = date("d", $start_date);
$startDateHour = date("H", $start_date);
$startDateMinute = date("i", $start_date);
$startDateSecond = date("s", $start_date);
$access_enddate = date("Y-m-d H:i:s", mktime($startDateHour, $startDateMinute, $startDateSecond, $startDateMonth + $duration, $startDateDay, $startDateYear));
$this->setAccessEnddate($access_enddate);
}
示例4: getPrivateRoomSessions
public function getPrivateRoomSessions(ilDateTime $from = null, ilDateTime $to = null, $user_id = 0, $room_id = 0)
{
global $ilDB;
$query = 'SELECT proom_id, title FROM ' . self::$privateRoomsTable . ' WHERE proom_id IN (
SELECT proom_id FROM ' . self::$privateSessionsTable . ' WHERE connected >= %s AND disconnected <= %s AND user_id = %s
) AND parent_id = %s';
$rset = $ilDB->queryF($query, array('integer', 'integer', 'integer', 'integer'), array($from->getUnixTime(), $to->getUnixTime(), $user_id, $room_id));
$result = array();
while ($row = $ilDB->fetchAssoc($rset)) {
$result[] = $row;
}
return $result;
}
示例5: checkConcurrentMeetingDates
public function checkConcurrentMeetingDates(ilDateTime $endDate, ilDateTime $startDate = null, $ignoreId = null)
{
/**
* @var $ilDB ilDB
*/
global $ilDB;
if ($startDate == null) {
$startDate = new ilDateTime(time(), IL_CAL_UNIX);
}
$sim = array();
$srv = ilAdobeConnectServer::_getInstance();
$new_start_date = $startDate->getUnixTime() - $srv->getBufferBefore();
$new_end_date = $endDate->getUnixTime() + $srv->getBufferAfter();
$query = array('SELECT * FROM rep_robj_xavc_data', 'WHERE (', '(%s > start_date AND %s < end_date) OR', '(%s > start_date AND %s < end_date) OR', '(%s < start_date AND %s > end_date)', ')');
$types = array('integer', 'integer', 'integer', 'integer', 'integer', 'integer');
$values = array($new_start_date, $new_start_date, $new_end_date, $new_end_date, $new_start_date, $new_end_date);
if ($ignoreId !== null) {
$query[] = 'AND id <> %s';
$types[] = 'integer';
$values[] = $ignoreId;
}
$res = $ilDB->queryF(join(' ', $query), $types, $values);
while ($row = $ilDB->fetchObject($res)) {
if (ilObject::_hasUntrashedReference($row->id)) {
$sim[] = $row;
}
}
return $sim;
}