note 20420 deleted from function.split by didou
| From: | didou@php.net | Date: | Sat, 16 Aug 2003 16:26:52 +0000 |
| Subject: | note 20420 deleted from function.split by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-54418@lists.php.net to get a copy of this message | ||
Note Submitter: James@reftech.co.uk
----
A slightly better Apache CLF date splitter than the note under 'strtotime';
$apachedate = "26/Mar/2002:15:22:19 +0000";
list ($date[day], $date[month], $date[year], $date[hour], $date[minute], $date[second],
$date[offset]) = split('[/: ]', $apachedate);
The above builds an array that you can play with fairly elegantly, but note that the month is
returned as a TLA (Three Letter Abbreviation).