本文整理汇总了PHP中XDateTime::valueOfTime方法的典型用法代码示例。如果您正苦于以下问题:PHP XDateTime::valueOfTime方法的具体用法?PHP XDateTime::valueOfTime怎么用?PHP XDateTime::valueOfTime使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XDateTime
的用法示例。
在下文中一共展示了XDateTime::valueOfTime方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fix4thief
private function fix4thief($response)
{/*{{{*/
if (($this->_newUser instanceof User) && $this->thiefUserNames() && ('2013-10-10 16:35:00' >= XDateTime::valueOfTime(UserClient::getInstance()->getSeed('time'))->toString()))
{
UserClient::getInstance()->logout();
$response->exitJump('http://www.haodf.com');
}
}/*}}}*/
示例2: transferSecurityInfo
public static function transferSecurityInfo($data, $action, $key = '')
{/*{{{*/
if (false == isset($data['_s']))
{
$configs = BeanFinder::get('wapconfigs');
if(in_array($action, $configs->actions))
{
return 202;
}
return $data;
// return 205;
}
$s = array();
$s = self::getSecurityInfo($data['_s'], $key);
if(false == isset($s['verify']))
{
//return 205;
}
if(is_array($s))
{
$data = array_merge($s,$data);
}
$base = self::transferData($data,$action, $key);
if(false == ($base == $s['verify']))
{
//return 205;
}
if(isset($s['requestTime']))
{
$isOutTime = self::isOutTime($s['requestTime']);
if($isOutTime)
{
error_log("[".XDateTime::now()."] ".$s['requestTime']."->>>".XDateTime::valueOfTime($s['requestTime'])." os:".$_REQUEST['os']." app:".$_REQUEST['app']." version:".$_REQUEST['v']."\n", 3, "/tmp/android_requesttimeout.log");
return 203;
}
}
/*$isCrypt = self::prepareCryptConfigs($s, $action);
if($isCrypt == false)
{
return 202;
}*/
if (false == is_array($s))
return 124;
foreach ($s as $k => $v)
{
$data[$k] = $v;
}
return $data;
}/*}}}*/
示例3: addOrModifyRemitApplication
public function addOrModifyRemitApplication($request, $response)
{
/*{{{*/
$oldRemark = "";
if ($request->telRemitAppId) {
$this->execute($request->telRemitAppId, TelRemitApplication::STATUS_CANCEL, "取消认领记录");
$oldTelRemitApp = DAL::get()->find('telremitapplication', $request->telRemitAppId);
$oldRemark = $oldTelRemitApp->remark;
}
//$accountUser = DAL::get()->find('user',$request->accountUserId);
//$accountPatient = DAL::get()->find('patient',$request->accountPatientId);
$remitHour = $request->remitHour != "" ? $request->remitHour : 0;
$remitMinute = $request->remitMinute != "" ? $request->remitMinute : 0;
DBC::requireFalse($remitHour > 24 || $remitMinute > 60, '时间格式不对');
$dateInfos = explode('-', $request->remitTime);
$remitTime = mktime($remitHour, $remitMinute, 0, $dateInfos[1], $dateInfos[2], $dateInfos[0]);
$remitTime = XDateTime::valueOfTime($remitTime);
$params = array('accountUserName' => $request->userName, 'accountPatientName' => $request->patientName, 'patientMobile' => $request->patientMobile, 'remitProvince' => $request->remitProvince, 'remitCity' => $request->remitCity, 'remitBank' => $request->remitBank, 'remitAmount' => $request->remitAmount, 'remitUserName' => $request->remitUserName, 'remitChannel' => $request->remitChannel, 'remitTime' => $remitTime, 'collectAccount' => $request->collectAccount, 'remitAccount' => $request->remitAccount, 'remark' => $oldRemark);
$newTelRemitAppId = TelRemitApplicationClient::getInstance()->addTelRemitApplication($this->curInspector->user, TelRemitApplication::TYPE_CLAIM_MONEY, $params);
if ($request->remark) {
TelRemitApplicationClient::getInstance()->addRemark($newTelRemitAppId, $this->curInspector->user, $request->remark);
}
$response->setRedirect($response->router->urlfor('comprehensivetask/remitapplicationlist', array('applicationStatus' => TelRemitApplication::STATUS_UN_CLAIM)));
}
示例4: stopService
/**
* stopService 挂机推送
*
* @param mixed $request
* @param mixed $response
* @access public
* @return void
*/
public function stopService($request, $response)
{/*{{{*/
$spCallId = $request->callid;
$spCallDuration = $request->endtime - $request->starttime;
$recordUrl = $request->recordurl;
$currentDay = XDateTime::now()->toStringByFormat("Ymd");
if($recordUrl)
{
$configs = ProviderConfigFactory::getProviderAppConfigs(CallCenterApiFaculty::SPTYPE_TINET, TeleConfProvider::APPTYPE_CALLCENTER);
if (false == empty($configs['appUrl']))
{
$voiceUrl = $configs['appUrl'];
$recordUrl = $voiceUrl."voices/record/".$currentDay."/".$recordUrl;
$recordUrl = $this->splitRecordUrl($recordUrl);
}
}
$starttime = $request->starttime;
$starttime = empty($starttime) ? '' : XDateTime::valueOfTime($starttime);
return $this->callCenterApi->dealStopServiceCallBack($spCallId, $spCallDuration, $recordUrl,
$starttime, XDateTime::valueOfTime($request->endtime), XDateTime::valueOfTime($request->ctime));
}/*}}}*/
示例5: printTime4Touch
public static function printTime4Touch($time, $format="Y-m-d H:i:s")
{/*{{{*/
$time = is_numeric($time) ? $time : strtotime($time);
$alltime = floor((time() - $time) / 60);
if ($alltime < 60) {
if ($alltime <= 0) $alltime = 1;
return $alltime . '分钟前';
} elseif ($alltime < 60 * 24) {
return floor($alltime / 60) . '小时前';
} elseif ($alltime < 60 * 24 * 7) {
return floor($alltime / (60 * 24)) . '天前';
} else {
return XDateTime::valueOfTime($time)->toStringByFormat($format);
}
}/*}}}*/
示例6: confirmTime
public function confirmTime($request, $response)
{/*{{{*/
$fromHour = ($request->fromHour != "")?$request->fromHour:0;
$fromMinute = ($request->fromMinute != "")?$request->fromMinute:0;
DBC::requireFalse($fromHour > 24 || $fromMinute > 60, '时间格式不对');
$dateInfos = explode('-', $request->appointmentDate);
$fromTime = mktime($fromHour, $fromMinute, 0, $dateInfos[1], $dateInfos[2], $dateInfos[0]);
$fromTime = XDateTime::valueOfTime($fromTime);
$isSendSms = ($request->isSendConfirmTime != "") ? $request->isSendConfirmTime : 0;
//时间段超过数量,不允许预约
$overLoadConfirmTimeInfos = DAL::get()->queryOverLoadConfirmTimeByCnt('TelOrder', 100);
if(false == empty($overLoadConfirmTimeInfos) &&
( isset($overLoadConfirmTimeInfos[$fromTime->toString()])
|| isset($overLoadConfirmTimeInfos[$fromTime->addMinute(-5)->toString()])
|| isset($overLoadConfirmTimeInfos[$fromTime->addMinute(5)->toString()]) ))
{
echo 'false';
return parent::DIRECT_OUTPUT;
}
TelOrderClient::getInstance()->confirmTime($this->curUser, $request->orderId, $fromTime, array('isSendSms' => $isSendSms, 'caseTitle'=>$request->caseTitle));
//关闭任务,添加备注,添加日志
$taskList = DAL::get()->find_all_by_telorderid_and_tasktype('TelOrderTask', $request->orderId, TelOrderTask::TYPE_RESERVE_DEAL_ORDER);
foreach($taskList as $task)
{
if($task->isFinished())
{
continue;
}
$taskId = $task->id;
TelOrderTaskClient::getInstance()->executeTask($taskId, $this->curUser->id, TelOrderTask::STATUS_FINISHED);
TelOrderRemarkClient::getInstance()->createOrderRemark($this->curUser, $task->spaceId, $task->id, TelOrderRemark::TYPE_SET_EXECUTETIME,"确认咨询时间: " . $fromTime->toStringByFormat('Y-m-d H:i'));
}
//重新约时间时,关闭已经有的空会议室
$conf = phoneConferenceClient::getInstance()->getInitPhoneConf($request->orderId);
if(false == $conf->isNull() && $conf->isConfInit())
{
PhoneConferenceClient::getInstance()->dismissConsultConf($conf);
}
echo "ok";
return parent::DIRECT_OUTPUT;
}/*}}}*/
示例7: date
?>
</table>
</td>
<td valign="top">
<?php
if ($space->updateStatus & 2) {
print '<img src="/img/iconwarning.gif" align="absmiddle">';
echo $space->getChangeData4Name('note1');
} else {
echo $space->note1;
}
?>
</td>
<td valign="top"><?php
if ($space->offlineNoteValidTime) {
echo XDateTime::valueOfTime($space->offlineNoteValidTime)->toShortString();
}
?>
</td>
<td valign="top">
<?php
if ($space->updateStatus & 4) {
print '<img src="/img/iconwarning.gif" align="absmiddle">';
echo $space->getChangeData4Name('note2');
} else {
echo $space->note2;
}
?>
</td>
<td valign="top"><nobr><?php
echo date("y-m-d H:i", $space->utime->getTime());
示例8: confirmBookingOrder
public function confirmBookingOrder($doctorId, $bookingOrderId, $schedule, $address)
{/*{{{*/
$doctor = DAL::get()->find('doctor', $doctorId);
$res = $this->checkDoctorAndSpace($doctor);
if($res)
{
$this->setErrorCode($res);
return 0;
}
if($doctor->space->isBookingOpened() == false)
{
$this->setErrorCode(160);
return 0;
}
$schedule = XDateTime::valueOfTime($schedule);
$params = array(
'id'=> $bookingOrderId,
'schedule' => $schedule,
'address' => $address,
'sendSmsAndMsg' => true
);
BookingClient::getInstance()->doctorConfirmOrder($doctor->space->user, $params, $bookingOrderId);
}/*}}}*/
示例9: forceLogout
function forceLogout($userName, $time)
{/*{{{*/
if ('2014-11-05 15:00:00' >= XDateTime::valueOfTime($time)->toString()
&& isInThiefUserNames($userName))
{
UserClient::getInstance()->logout();
}
}/*}}}*/