Re: strtotime problem

From: Date: Mon, 04 Feb 2002 22:13:28 +0000
Subject: Re: strtotime problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-83474@lists.php.net to get a copy of this message
On Mon, 2002-02-04 at 13:40, toni baker wrote: > $date1 = "10/12/2002"; > $date1 = date("D M j Y", strtotime($date1)); > $date2 = date("D M j Y"); > $date3 = date("D M j Y", $date1); > print $date1."<br>"; > print $date2."<br>"; > print $date3."<br>"; > > The code above gives me the following output: > > Fri Oct 11 2002 > Mon Feb 4 2002 > Wed Dec 31 1969 > > Is the strtotime() function causing this problem? > Thanks. What do you get with the following? <?php $date = "10/12/2002"; echo date("r I", strtotime($date)) . "\n"; echo date("r I"); ?> Torben -- Torben Wilson <torben@php.net> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506

« previous php.general (#83474) next »