diff --git a/backend/lib/Interpreter/Interpreter.php b/backend/lib/Interpreter/Interpreter.php index 10105c4..94f26ba 100644 --- a/backend/lib/Interpreter/Interpreter.php +++ b/backend/lib/Interpreter/Interpreter.php @@ -180,12 +180,12 @@ abstract class Interpreter implements InterpreterInterface { * @return float */ protected static function parseDateTimeString($string, $now) { - if ($ts = strtotime($string, $now / 1000)) { - return $ts * 1000; - } - elseif (ctype_digit($string)) { + if (ctype_digit($string)) { return (float) $string; } + elseif ($ts = strtotime($string, $now / 1000)) { + return $ts * 1000; + } else { throw new \Exception('Invalid time format: ' . $string); } @@ -197,4 +197,4 @@ abstract class Interpreter implements InterpreterInterface { public function getUuid() { return $this->channel->getUuid(); } } -?> \ No newline at end of file +?>