本文整理汇总了PHP中DateTimeField::getPHPDateFormat方法的典型用法代码示例。如果您正苦于以下问题:PHP DateTimeField::getPHPDateFormat方法的具体用法?PHP DateTimeField::getPHPDateFormat怎么用?PHP DateTimeField::getPHPDateFormat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DateTimeField
的用法示例。
在下文中一共展示了DateTimeField::getPHPDateFormat方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveentity
function saveentity($module_name, $fileid = '')
{
$date_start = $this->column_fields['date_start'];
$due_date = $this->column_fields['due_date'];
$start = DateTimeField::convertToDBTimeZone($this->column_fields['date_start'] . ' ' . $this->column_fields['time_start']);
$this->column_fields['date_start'] = $start->format(DateTimeField::getPHPDateFormat());
$end = DateTimeField::convertToDBTimeZone($this->column_fields['due_date'] . ' ' . $this->column_fields['time_end']);
$this->column_fields['due_date'] = $end->format(DateTimeField::getPHPDateFormat());
parent::saveentity($module_name, $fileid = '');
$this->column_fields['date_start'] = $date_start;
$this->column_fields['due_date'] = $due_date;
}
示例2: __construct
public function __construct()
{
$this->_connec_client = new Maestrano_Connec_Client();
$this->_date_format = DateTimeField::getPHPDateFormat();
}
示例3: getDBTimeFromUserValue
public function getDBTimeFromUserValue($value)
{
$time = DateTimeField::convertToDBTimeZone(date(DateTimeField::getPHPDateFormat()) . ' ' . $value);
$value = $time->format('H:i:s');
return $value;
}
示例4: date
/**
* Gets the Mail Date
* @param Boolean $format
* @return Date
*/
public function date($format = false)
{
$date = $this->_date;
if ($date) {
if ($format) {
$dateTimeFormat = Vtiger_Util_Helper::convertDateTimeIntoUsersDisplayFormat(date('Y-m-d H:i:s', strtotime($date)));
list($date, $time, $AMorPM) = explode(' ', $dateTimeFormat);
$pos = strpos($dateTimeFormat, date(DateTimeField::getPHPDateFormat()));
if ($pos === false) {
return $date;
} else {
return $time . ' ' . $AMorPM;
}
} else {
return Vtiger_Util_Helper::convertDateTimeIntoUsersDisplayFormat(date('Y-m-d H:i:s', $date));
}
}
return '';
}