- Модуль: timeman
- Путь к файлу: ~/bitrix/modules/timeman/lib/monitor/history/userchart.php
- Класс: BitrixTimemanMonitorHistoryUserChart
- Вызов: UserChart::record
static function record($history): void
{
$date = new Date($history['dateLog'], 'Y-m-j');
foreach ($history['chartPackage'] as $index => $entry)
{
MonitorUserChartTable::add([
'DATE_LOG' => $date,
'USER_ID' => User::getCurrentUserId(),
'DESKTOP_CODE' => $history['desktopCode'],
'GROUP_TYPE' => $entry['type'],
'TIME_START' => new DateTime($entry['start'], DateTimeInterface::RFC3339),
'TIME_FINISH' => new DateTime($entry['finish'], DateTimeInterface::RFC3339),
]);
}
}