note 102300 deleted from function.date by danbrown
| From: | danbrown@php.net | Date: | Wed, 09 Feb 2011 21:49:22 +0000 |
| Subject: | note 102300 deleted from function.date by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-176824@lists.php.net to get a copy of this message | ||
Note Submitter: info at anu3d dot info
----
The date function sometimes give wrong answers. This code will help you figure it out.
<?php
$d="2010-01-31 09:06:09";
$i= strtotime($d);
echo $d;
echo "<br>";
echo date("Y-m-d h:m:s",$i);
?>
this gives the output:
2010-01-31 09:06:09
2010-01-31 09:01:09
very small change but still not accurate.