RE: [PHP] Problem with date
| From: | Jack | Date: | Wed, 07 Dec 2011 23:29:38 +0000 |
| Subject: | RE: [PHP] Problem with date | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-315949@lists.php.net to get a copy of this message | ||
> To: PHP
> Subject: RE: [PHP] Problem with date
>
> >
> >
> > How about a little debugging here (and possibly elsewhere):
> >
> > if (isset($pubdate) && ($pubdate >0)) {
> > $pubdate=strtotime($pubdate);
> > } else {
> > die("Barf. Can't run a string to time conversion on 0 or
-1.");
> > }
> >
>
> Thanks Kevin,
>
> This bombs and gives me the BARF!
>
FYI the date field is stored in a MySQL DB as a datetime type