mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
Timestamp: Properly handle non-convertible text
This commit is contained in:
parent
71a92d0a95
commit
f2f220c715
1 changed files with 6 additions and 1 deletions
|
|
@ -24,7 +24,12 @@ class Timestamp extends PropertyBehavior
|
|||
}
|
||||
|
||||
if (! ctype_digit($value)) {
|
||||
$value = strtotime($value);
|
||||
$timestamp = strtotime($value);
|
||||
if ($timestamp === false) {
|
||||
return $value;
|
||||
} else {
|
||||
$value = $timestamp;
|
||||
}
|
||||
}
|
||||
|
||||
return $value * 1000.0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue