note 19542 deleted from function.strtotime by vincent
| From: | vincent@php.net | Date: | Thu, 11 Sep 2003 19:41:15 +0000 |
| Subject: | note 19542 deleted from function.strtotime by vincent | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-56173@lists.php.net to get a copy of this message | ||
Note Submitter: ivank@2xtreme.net
----
You can use this to parse the date you find in your apache log files:
<?
$date = "02/Mar/2002:01:31:34";
list($day, $month, $year) = explode("/", $date, 3);
# year actually has hours, minutes, seconds suffixed to it, until now:
list($year, $hour, $minute, $second) = explode(":", $year, 4);
$formdate = "$day $month $year $hour:$minute:$second";
echo strtotime ("$formdate"), "\n";
?>