当前位置: 首页>>代码示例>>PHP>>正文


PHP ilDateTime::getUnixTime方法代码示例

本文整理汇总了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;
 }
开发者ID:KamuiXenom,项目名称:ILIAS_AdobeConnectPlugin,代码行数:11,代码来源:class.ilObjAdobeConnect.php

示例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();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:22,代码来源:class.ilSessionAppointment.php

示例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);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:15,代码来源:class.ilPaymentBookings.php

示例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;
    }
开发者ID:bheyser,项目名称:qplskl,代码行数:14,代码来源:class.ilChatroom.php

示例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;
 }
开发者ID:HochschuleLuzern,项目名称:ILIAS_AdobeConnectPlugin,代码行数:29,代码来源:class.ilAdobeConnectQuota.php


注:本文中的ilDateTime::getUnixTime方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。