Re: date(), strtotime(), Wed, Dec 31, 1969 ??
| From: | Rasmus Lerdorf | Date: | Fri, 03 May 2002 16:07:06 +0000 |
| Subject: | Re: date(), strtotime(), Wed, Dec 31, 1969 ?? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-95913@lists.php.net to get a copy of this message | ||
Because your strtotime() call is returning 0. Replace the '-' with '/'
and I bet it would work.
-Rasmus
On Fri, 3 May 2002, ROBERT MCPEAK wrote:
> Running PHP3 on a Linux box and I've got trouble with date().
>
> Here's the code:
>
> $blah=2002-05-02;
> $thedate = date("D, M d, Y", strtotime($blah));
> $echo "$thedate";
>
>
> Why is $thedate resolving to Wed, Dec 31, 1969.
>
> Thanks!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>