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


PHP Time::getAdjustedTime方法代码示例

本文整理汇总了PHP中Time::getAdjustedTime方法的典型用法代码示例。如果您正苦于以下问题:PHP Time::getAdjustedTime方法的具体用法?PHP Time::getAdjustedTime怎么用?PHP Time::getAdjustedTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Time的用法示例。


在下文中一共展示了Time::getAdjustedTime方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: get_calendar_actual_date

/**
* Sets the 'actualDate' field of the MyCalendar object
* @param none
* @return datestamp of the viewed date
*/
function get_calendar_actual_date()
{
    if (isset($_GET['date'])) {
        $date_split = explode('-', $_GET['date']);
    } else {
        $date_split = explode('-', date('m-d-Y', Time::getAdjustedTime(mktime(), date('H') * 60)));
    }
    return mktime(0, 0, 0, $date_split[0], $date_split[1], $date_split[2]);
}
开发者ID:razagilani,项目名称:srrs,代码行数:14,代码来源:rescalendar.php

示例2: formatReminder

 function formatReminder()
 {
     $builder = new StringBuilder();
     if ($this->_reservation->reminder_minutes_prior != 0) {
         $reminder_time = $this->_reservation->start + $this->_reservation->start * 60 - $this->_reservation->reminder_minutes_prior * 60;
         $adjusted = Time::getAdjustedTime($reminder_time);
         $builder->append(sprintf("DALARM:%sT%sZ\r\n", date('Ymd', $adjusted), date('His', $adjusted)));
     }
     return $builder->toString();
 }
开发者ID:razagilani,项目名称:srrs,代码行数:10,代码来源:VCalReservationFormatter.php

示例3: formatSettings

 function formatSettings()
 {
     $builder = new StringBuilder();
     $builder->append("UID:{$this->_reservation->id}\r\n");
     $adjusted = Time::getAdjustedTime(mktime());
     $builder->append(sprintf("DTSTAMP:%sT%sZ\r\n", date('Ymd', $adjusted), date('His', $adjusted)));
     $adjusted_start = Time::getAdjustedMinutes($this->_reservation->start);
     $builder->append(sprintf("DTSTART:%sT%s%s00Z\r\n", date('Ymd', Time::getAdjustedDate($this->_reservation->start_date, $this->_reservation->start)), Time::getHours($adjusted_start), Time::getMinutes($adjusted_start)));
     $adjusted_end = Time::getAdjustedMinutes($this->_reservation->end);
     $builder->append(sprintf("DTEND:%sT%s%s00Z\r\n", date('Ymd', Time::getAdjustedDate($this->_reservation->end_date, $this->_reservation->end)), Time::getHours($adjusted_end), Time::getMinutes($adjusted_end)));
     $adjusted = Time::getAdjustedTime($this->_reservation->created);
     $builder->append(sprintf("CREATED:%sT%sZ\r\n", date('Ymd', $adjusted), date('His', $adjusted)));
     if (!empty($this->_reservation->modified)) {
         $adjusted = Time::getAdjustedTime($this->_reservation->modified);
         $builder->append(sprintf("LAST-MODIFIED:%sT%sZ\r\n", date('Ymd', $adjusted), date('His', $adjusted)));
     }
     return $builder->toString();
 }
开发者ID:razagilani,项目名称:srrs,代码行数:18,代码来源:ICalReservationFormatter.php

示例4: printCalendar

 /**
  * Print the actual calendar and jump functions
  *
  * This function prints out the calendar and calls all
  * the associated functions to print the calendar,
  * links and forms used to jump to a new month
  *
  * (This is the only function that needs to be called
  * after a Calendar has been created)
  * @param none
  */
 function printCalendar($current_date)
 {
     $today = getdate(Time::getAdjustedTime(mktime()));
     $selected_date_array = getdate($current_date);
     $this->printCalendarBody($today, $selected_date_array);
     if ($this->isPopup) {
         $this->printJumpForm();
     }
 }
开发者ID:razagilani,项目名称:srrs,代码行数:20,代码来源:Calendar.class.php

示例5: getAdjustedDate

 /**
  * Gets the timezone adjusted datestamp for the current user with 0 hour/minute/second
  * @param int $timestamp the timestamp to adjust
  * @param int $res_time the reservation starttime or endtime as minutes
  * @param bool $to_server_time if this is going to server time or user time
  * @return the timezone adjusted timestamp for the current user, or the server timestamp if user is not logged in
  */
 function getAdjustedDate($timestamp, $res_time = null, $to_server_time = false)
 {
     $tmp = getdate(Time::getAdjustedTime($timestamp, $res_time, $to_server_time));
     return mktime(0, 0, 0, $tmp['mon'], $tmp['mday'], $tmp['year']);
 }
开发者ID:razagilani,项目名称:srrs,代码行数:12,代码来源:Time.class.php


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