function Kint_Parsers_Timestamp::_parse
Overrides kintParser::_parse
File
-
kint/
kint/ parsers/ custom/ timestamp.php, line 19
Class
Code
protected function _parse(&$variable) {
if (!self::_fits($variable)) {
return false;
}
$var = strlen($variable) === 13 ? substr($variable, 0, -3) : $variable;
$this->type = 'timestamp';
# avoid dreaded "Timezone must be set" error
$this->value = @date('Y-m-d H:i:s', $var);
}