- Модуль: dav
- Путь к файлу: ~/bitrix/modules/dav/classes/general/dav.php
- Класс: CDav
- Вызов: CDav::FormatDateTime
static function FormatDateTime($date, $format = null)
{
// 20110118T131500
if (mb_strlen($date) < 15)
return 0;
$year = intval(mb_substr($date, 0, 4));
$month = intval(mb_substr($date, 4, 2));
$day = intval(mb_substr($date, 6, 2));
$hour = intval(mb_substr($date, 9, 2));
$minute = intval(mb_substr($date, 11, 2));
$second = intval(mb_substr($date, 13, 2));
$t = mktime($hour, $minute, $second, $month, $day, $year);
if (!is_string($format) || empty($format))
$format = FORMAT_DATETIME;
return date($GLOBALS["DB"]->DateFormatToPHP($format), $t);
}