14 if (!static::isCorrect($timeFormatted))
16 $this->timestamp = (new \Bitrix\Main\Type\Date(
'0000-00-00',
'Y-m-d'))->
getTimestamp();
18 elseif (static::isSerialized($timeFormatted))
20 preg_match(
'#(\d{2}:\d{2})\s\[([0-9\-]+)\]#i', $timeFormatted, $matches);
21 $timeFormatted = $matches[1];
22 $userOffset = (int)$matches[2];
23 $dateTime = new \Bitrix\Main\Type\DateTime($timeFormatted, static::getRenderFormat());
25 $this->timestamp = $dateTime->getTimestamp() - $userOffset;
29 $format = static::isRenderFormat($timeFormatted) ? static::getRenderFormat() : static::getFormat();
30 $dateTime = new \Bitrix\Main\Type\DateTime($timeFormatted, $format);
31 $this->timestamp = $dateTime->getTimestamp() -
$offset;