fix #66486 strtotime with whitespace return false

https://bugs.php.net/bug.php?id=66486

added ltrim to check if input is an empty string