strtotime failure
| From: | Koenig, Jennifer | Date: | Tue, 07 May 2002 08:47:42 +0000 |
| Subject: | strtotime failure | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-96370@lists.php.net to get a copy of this message | ||
Hallo,
Why would strtotime fail (i.e. return a -1)? I check the type with gettype,
which tells me that the argument I'm passing in is a string. I cast it to a
string before passing it in, with the same results (returns a -1). The only
thing that seems to do anything is to settype it to "string" before calling
strtotime, which ends up with bizarre results.
The arguments I'm passing in are, for example 11:00, 13:00, 14:30, etc, and
are coming out of a database. Only SOME of this data results in a -1 when I
call strtotime on it. Other records (the same numbers - 11:00, 13:00, etc.)
come out fine.
Could the data that's failing strtotime have been corrupted on data-entry?
Why does is_string on this data tell me it's a string?
--Jennifer Koenig